Repository navigation
Conversation
diptorupd
marked this pull request as draft
October 14, 2021 23:51
diptorupd
force-pushed
the
feature/error_handler
branch
2 times, most recently
from
October 15, 2021 00:00
89f994b to
daaec1a
Compare
Collaborator
diptorupd
force-pushed
the
feature/error_handler
branch
3 times, most recently
from
October 17, 2021 19:13
7c75f5d to
820ba1b
Compare
added 2 commits
October 19, 2021 21:14
- A new DPCTLExecState type and associated constructors
and destructors are added.
- The error_handler_callback is depracated and is superseded
by the new error_handler_callback_fn type. The new function
type allows passing in both an error code and an error
message.
- A default error handler function is defined that will
print out an error code and optionally an associated error
message, file name, func name, line number to std::cerr.
- Renamed the dpctl_async_error_handler.{h|cpp} files to
dpctl_error_handlers to include an implementation of the
default error handler.
diptorupd
force-pushed
the
feature/error_handler
branch
from
October 20, 2021 02:16
820ba1b to
a592ba8
Compare
Contributor
Author
|
@oleksandr-pavlyk I force-pushed again as I cleaned up the interface a bit. Here on, we can have a clean commit log and then chose to squash as desired before merging. I have modified a single function in the |
| } catch (std::bad_alloc const &ba) { | ||
| // \todo log error | ||
| std::cerr << ba.what() << '\n'; | ||
| handler(-1, ba.what(), __FILE__, __func__, __LINE__); |
Contributor
There was a problem hiding this comment.
Was not aware of __func__. Cool!
Contributor
Author
|
@oleksandr-pavlyk The handler needs to be passed through both error code and error category if we want to properly work with SYCL exceptions. The current design is not quite up to that need. |
| * @brief Convenience macro to add deprecation attributes to functions. | ||
| * | ||
| */ | ||
| #define DEPRACATION_NOTICE(notice, FN) notice " " #FN |
Contributor
There was a problem hiding this comment.
Suggested change
| #define DEPRACATION_NOTICE(notice, FN) notice " " #FN | |
| #define DEPRECATION_NOTICE(notice, FN) notice " " #FN |
Contributor
|
Subsumed by #683 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #35
Does not contain all the changes, more is coming. As of now I only added a new class to capture an "execution state" that for now is just an error handler. The next set of changes will include updating the API of all interfaces.
Fixes #330
Since we are changing the functions anyway, might as well implement the new naming convention proposed in #330.