From 64a8755af396f1c2791018510e22b58114e68594 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sat, 27 Mar 2021 18:52:22 +0200 Subject: qt: Add BitcoinApplication::handleNonFatalException function This helper function will be used in the following commits. Co-authored-by: Russell Yanofsky --- src/qt/bitcoin.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/qt/bitcoin.cpp') diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index aec63ffaf0..de71b7dea7 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -426,6 +426,16 @@ void BitcoinApplication::handleRunawayException(const QString &message) ::exit(EXIT_FAILURE); } +void BitcoinApplication::handleNonFatalException(const QString& message) +{ + assert(QThread::currentThread() == thread()); + QMessageBox::warning( + nullptr, tr("Internal error"), + tr("An internal error occurred. %1 will attempt to continue safely. This is " + "an unexpected bug which can be reported as described below.").arg(PACKAGE_NAME) % + QLatin1String("

") % GUIUtil::MakeHtmlLink(message, PACKAGE_BUGREPORT)); +} + WId BitcoinApplication::getMainWinId() const { if (!window) -- cgit v1.2.3