diff options
author | furszy <matiasfurszyfer@protonmail.com> | 2023-06-08 12:16:23 -0300 |
---|---|---|
committer | furszy <matiasfurszyfer@protonmail.com> | 2023-06-10 11:10:29 -0300 |
commit | 4927167f855f8ed3bbf6d2766f61229f742e632a (patch) | |
tree | d6cc80afde57f8374588f492d8cdcde471b4a80b /src/node/interfaces.cpp | |
parent | 3b2c61e8198bcefb1c2343caff1d705951026cc4 (diff) |
gui: return EXIT_FAILURE on post-init fatal errors
Diffstat (limited to 'src/node/interfaces.cpp')
-rw-r--r-- | src/node/interfaces.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/node/interfaces.cpp b/src/node/interfaces.cpp index bf42167c2f..f741bd6d03 100644 --- a/src/node/interfaces.cpp +++ b/src/node/interfaces.cpp @@ -89,6 +89,7 @@ public: void initLogging() override { InitLogging(args()); } void initParameterInteraction() override { InitParameterInteraction(args()); } bilingual_str getWarnings() override { return GetWarnings(true); } + int getExitStatus() override { return Assert(m_context)->exit_status.load(); } uint32_t getLogCategories() override { return LogInstance().GetCategoryMask(); } bool baseInitialize() override { @@ -105,7 +106,10 @@ public: } bool appInitMain(interfaces::BlockAndHeaderTipInfo* tip_info) override { - return AppInitMain(*m_context, tip_info); + if (AppInitMain(*m_context, tip_info)) return true; + // Error during initialization, set exit status before continue + m_context->exit_status.store(EXIT_FAILURE); + return false; } void appShutdown() override { |