diff --git a/src/Server/TCPHandler.cpp b/src/Server/TCPHandler.cpp index c77414651cc..5553d5f8f5e 100644 --- a/src/Server/TCPHandler.cpp +++ b/src/Server/TCPHandler.cpp @@ -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();