This commit is contained in:
Alexander Kuzmenkov 2020-07-17 17:25:13 +03:00
parent 4089f761e1
commit a4a23673cc

View File

@ -313,16 +313,18 @@ void TCPHandler::runImpl()
state.io.onException();
exception.emplace(Exception::CreateFromPocoTag{}, e);
}
// Server should die on std logic errors in debug, like with assert()
// or ErrorCodes::LOGICAL_ERROR. This helps catch these errors in
// tests.
#ifndef NDEBUG
catch (const std::logic_error & e)
{
// Server should die on std logic errors in debug, like with assert()
// or ErrorCodes::LOGICAL_ERROR. This helps catch these errors in
// tests.
state.io.onException();
exception.emplace(Exception::CreateFromSTDTag{}, e);
sendException(*exception, send_exception_with_stack_trace);
assert(false);
std::abort();
}
#endif
catch (const std::exception & e)
{
state.io.onException();