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:
if (--refCount_ == 0)
{
std::unique_ptr<ref_counted_statement_base> deleter(this);
if (std::uncaught_exception())
return;
try
{
......@@ -48,9 +46,12 @@ public:
final_action();
}
catch (...)
{
throw;
catch (const std::exception &e) {
throw e;
}
catch (...) {
std::cerr << "Generic handled exception. Can be a buggy impl." << std::endl;
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