From 55d37546faa6b928d361e8b7ce9a90b49057d09a Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Fri, 6 Mar 2026 23:40:27 +0000 Subject: [PATCH] Bugfix: GUI/Intro: Handle errors from SelectParams the same as if during InitConfig Without this, invalid vbparams just silently exit with no message --- src/qt/intro.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp index f86b1670764..f966d2f8883 100644 --- a/src/qt/intro.cpp +++ b/src/qt/intro.cpp @@ -18,7 +18,9 @@ #include #include +#include #include +#include #include #include @@ -26,6 +28,7 @@ #include #include +#include /* Check free space asynchronously to prevent hanging the UI thread. @@ -221,8 +224,10 @@ bool Intro::showIfNeeded(bool& did_show_intro, int64_t& prune_MiB) /* Use selectParams here to guarantee Params() can be used by node interface */ try { SelectParams(gArgs.GetChainType()); - } catch (const std::exception&) { - return false; + } catch (const std::exception& e) { + InitError(Untranslated(e.what())); + QMessageBox::critical(nullptr, CLIENT_NAME, QObject::tr("Error: %1").arg(QString(e.what()))); + std::exit(EXIT_FAILURE); } /* If current default data directory does not exist, let the user choose one */