aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoin.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-03-27 18:52:22 +0200
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-04-01 03:05:31 +0300
commit64a8755af396f1c2791018510e22b58114e68594 (patch)
treec679b813bf2ac5813ffceea4b6aa650b7da9e2e2 /src/qt/bitcoin.cpp
parentaf7e365b1516d660d271475fdfe0c20ae09e66a8 (diff)
downloadbitcoin-64a8755af396f1c2791018510e22b58114e68594.tar.xz
qt: Add BitcoinApplication::handleNonFatalException function
This helper function will be used in the following commits. Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
Diffstat (limited to 'src/qt/bitcoin.cpp')
-rw-r--r--src/qt/bitcoin.cpp10
1 files changed, 10 insertions, 0 deletions
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("<br><br>") % GUIUtil::MakeHtmlLink(message, PACKAGE_BUGREPORT));
+}
+
WId BitcoinApplication::getMainWinId() const
{
if (!window)