You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
More often than not, error handling by the returned value takes the form of some macro checks that emit an exception or similar. E.g.,
#defineL0_SAFE_CALL(call) \
{ \
auto status = (call); \
if (status) { \
throwsome_exception(to_string(status)); \
} \
}
To create a meaningful message it would be convenient to have a method in the loader that would take a single parameter - an error code - and return a string with the failure name. Even exposing the already-existing to_string function (https://github.com/oneapi-src/level-zero/blob/master/source/loader/ze_loader.cpp#L23) would be nice. This will make consumers not replicate it and avoid potential mismatches in case of any changes in the future.
The text was updated successfully, but these errors were encountered:
Jemale
pushed a commit
to Jemale/level-zero
that referenced
this issue
Jun 17, 2024
Hi!
More often than not, error handling by the returned value takes the form of some macro checks that emit an exception or similar. E.g.,
To create a meaningful message it would be convenient to have a method in the loader that would take a single parameter - an error code - and return a string with the failure name. Even exposing the already-existing
to_string
function (https://github.com/oneapi-src/level-zero/blob/master/source/loader/ze_loader.cpp#L23) would be nice. This will make consumers not replicate it and avoid potential mismatches in case of any changes in the future.The text was updated successfully, but these errors were encountered: