Improve unhandled exception error reporting in debug builds.
Change-Id: Ia92d1a93163105d817a2147d96f2edd399e2b70d
[ROCm/ROCR-Runtime commit: 3cef9b1a04]
Этот коммит содержится в:
@@ -130,11 +130,16 @@ hsa_status_t handleException() {
|
||||
return HSA_STATUS_ERROR_OUT_OF_RESOURCES;
|
||||
} catch (const hsa_exception& e) {
|
||||
return e.error_code();
|
||||
// Enable when callback exception support is added.
|
||||
// } catch (std::nested_exception& e) { // Rethrow exceptions from callbacks after unwinding
|
||||
// HSA.
|
||||
// } catch (std::nested_exception& e) {
|
||||
// Rethrow exceptions caught from callbacks.
|
||||
// e.rethrow_nested();
|
||||
// return HSA_STATUS_ERROR;
|
||||
#ifndef NDEBUG
|
||||
} catch (const std::exception& e) {
|
||||
fprintf(stderr, "Unhandled exception: %s\n", e.what());
|
||||
assert(false && "Unhandled exception.");
|
||||
return HSA_STATUS_ERROR;
|
||||
#endif
|
||||
} catch (...) {
|
||||
assert(false && "Unhandled exception.");
|
||||
abort();
|
||||
|
||||
Ссылка в новой задаче
Block a user