diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index d28bcca470f..2c5fd7e797b 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -46,7 +46,9 @@ #include #include +#include #include +#include #include #include @@ -680,7 +682,13 @@ int GuiMain(int argc, char* argv[]) } } catch (const std::exception& e) { PrintExceptionContinue(&e, "Runaway exception"); - app.handleRunawayException(QString::fromStdString(app.node().getWarnings().translated)); + std::string message = app.node().getWarnings().translated; + const std::string& what = e.what(); + if (!message.empty() && !what.empty()) { + message += "\n\n"; + } + message += what; + app.handleRunawayException(QString::fromStdString(message)); } catch (...) { PrintExceptionContinue(nullptr, "Runaway exception"); app.handleRunawayException(QString::fromStdString(app.node().getWarnings().translated)); diff --git a/src/qt/initexecutor.cpp b/src/qt/initexecutor.cpp index bb3f970b555..b713c86bd66 100644 --- a/src/qt/initexecutor.cpp +++ b/src/qt/initexecutor.cpp @@ -9,6 +9,7 @@ #include #include +#include #include #include @@ -34,7 +35,15 @@ InitExecutor::~InitExecutor() void InitExecutor::handleRunawayException(const std::exception* e) { PrintExceptionContinue(e, "Runaway exception"); - Q_EMIT runawayException(QString::fromStdString(m_node.getWarnings().translated)); + std::string message = m_node.getWarnings().translated; + if (e) { + const std::string& what = e->what(); + if (!message.empty() && !what.empty()) { + message += "\n\n"; + } + message += what; + } + Q_EMIT runawayException(QString::fromStdString(message)); } void InitExecutor::initialize()