Commit cad89b32 authored by Ronan's avatar Ronan

fix(ref_counted_statement): throw a exception copy, avoid a call to std::terminate

parent 580de519
...@@ -36,8 +36,6 @@ public: ...@@ -36,8 +36,6 @@ public:
if (--refCount_ == 0) if (--refCount_ == 0)
{ {
std::unique_ptr<ref_counted_statement_base> deleter(this); std::unique_ptr<ref_counted_statement_base> deleter(this);
if (std::uncaught_exception())
return;
try try
{ {
...@@ -48,8 +46,11 @@ public: ...@@ -48,8 +46,11 @@ public:
final_action(); final_action();
} }
catch (...) catch (const std::exception &e) {
{ throw e;
}
catch (...) {
std::cerr << "Generic handled exception. Can be a buggy impl." << std::endl;
throw; throw;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment