Skip to content

Implement error_handler function in libsyclinterface/helper #683

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Dec 1, 2021

Conversation

vlad-perevezentsev
Copy link
Collaborator

This PR adds two overloaded error_handler functions to pass an exception object and output an error.
Change all functions in dpctl_sycl_plaftorm_interface.cpp to use the error_handler.

@coveralls
Copy link
Collaborator

coveralls commented Nov 22, 2021

Coverage Status

Coverage increased (+0.4%) to 75.942% when pulling 3e0c061 on vlad-perevezentsev:error_handler into 476c804 on IntelPython:master.

@oleksandr-pavlyk oleksandr-pavlyk force-pushed the error_handler branch 4 times, most recently from 6040ec4 to 021045d Compare November 30, 2021 18:47
Copy link
Contributor

@oleksandr-pavlyk oleksandr-pavlyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

PR history requires cleanup though.

Rename dpctl_async_error_handler to dpctl_error_handlers

DPCTL_VERBOSITY env handling is introduced.
Recognized values: none (default), error, info

Made sure to run coverage tests with DPCTL_VERBOSITY=error

The TestDPCTLSyclQueueInterface.CheckPropertyHandling tests captured
error stream in its test.

Rename error_handler_callback *error_handler to prevert collisions
Copy link
Contributor

@oleksandr-pavlyk oleksandr-pavlyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary of history rewriting:

First commit implements error_handler, renames error handler helper file, renames argument name for functions taking async handler callback.

Then there are commits using error_handler in individual dpct_sycl_*.cpp files

@oleksandr-pavlyk oleksandr-pavlyk merged commit d22acb4 into IntelPython:master Dec 1, 2021
@vlad-perevezentsev vlad-perevezentsev deleted the error_handler branch June 20, 2023 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce error handler function to be used in places of std::cerr output
4 participants