Fix hip_throw. (#1285)
* Fix hip_throw. * Fix typo * No, really fix typo
Este cometimento está contido em:
1 ascendente
4ee600ed5e
cometimento
fbbed603ff
1 ficheiro modificado
+2
@@ -2494,6 +2494,8 @@ namespace hip_impl {
|
|||||||
[[noreturn]]
|
[[noreturn]]
|
||||||
void hip_throw(const std::exception& ex) {
|
void hip_throw(const std::exception& ex) {
|
||||||
#if defined(__cpp_exceptions)
|
#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;
|
throw ex;
|
||||||
#else
|
#else
|
||||||
std::cerr << ex.what() << std::endl;
|
std::cerr << ex.what() << std::endl;
|
||||||
|
|||||||
Criar uma nova questão referindo esta
Bloquear um utilizador