Fix hip_throw. (#1285)

* Fix hip_throw.

* Fix typo

* No, really fix typo


[ROCm/hip commit: fbbed603ff]
This commit is contained in:
Alex Voicu
2019-08-05 12:52:22 +03:00
کامیت شده توسط Maneesh Gupta
والد 3a04541b9d
کامیت 4509df8151
@@ -2494,6 +2494,8 @@ namespace hip_impl {
[[noreturn]]
void hip_throw(const std::exception& ex) {
#if defined(__cpp_exceptions)
if (auto rte = dynamic_cast<const std::runtime_error*>(&ex)) throw *rte;
if (auto lge = dynamic_cast<const std::logic_error*>(&ex)) throw *lge;
throw ex;
#else
std::cerr << ex.what() << std::endl;