From fbbed603ff19a1c2ec001991dce8e8fe5eb54946 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 --- src/hip_hcc.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hip_hcc.cpp b/src/hip_hcc.cpp index 8c47f54cf6..dcfdfb6137 100644 --- a/src/hip_hcc.cpp +++ b/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;