From a59924ae9819df0d67cceda75ffae374ad852b2e Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Mon, 5 Aug 2019 12:52:22 +0300 Subject: [PATCH] Fix hip_throw. (#1285) * Fix hip_throw. * Fix typo * No, really fix typo [ROCm/clr commit: e24df75cc116968b587e886f17fe7af83380d012] --- projects/clr/hipamd/src/hip_hcc.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/projects/clr/hipamd/src/hip_hcc.cpp b/projects/clr/hipamd/src/hip_hcc.cpp index 8c47f54cf6..dcfdfb6137 100644 --- a/projects/clr/hipamd/src/hip_hcc.cpp +++ b/projects/clr/hipamd/src/hip_hcc.cpp @@ -2494,6 +2494,8 @@ namespace hip_impl { [[noreturn]] void hip_throw(const std::exception& ex) { #if defined(__cpp_exceptions) + if (auto rte = dynamic_cast(&ex)) throw *rte; + if (auto lge = dynamic_cast(&ex)) throw *lge; throw ex; #else std::cerr << ex.what() << std::endl;