Improve unhandled exception error reporting in debug builds.

Change-Id: Ia92d1a93163105d817a2147d96f2edd399e2b70d


[ROCm/ROCR-Runtime commit: 3cef9b1a04]
Esse commit está contido em:
Sean Keely
2017-10-13 23:58:50 -05:00
commit 41615ea7d5
@@ -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();