diff --git a/src/command/CommandError.cxx b/src/command/CommandError.cxx index 941a7c990..42e622727 100644 --- a/src/command/CommandError.cxx +++ b/src/command/CommandError.cxx @@ -171,7 +171,12 @@ ToAck(std::exception_ptr ep) } catch (const std::system_error &e) { return ACK_ERROR_SYSTEM; } catch (...) { - return ACK_ERROR_UNKNOWN; + try { + std::rethrow_if_nested(ep); + return ACK_ERROR_UNKNOWN; + } catch (...) { + return ToAck(std::current_exception()); + } } }