mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
gui: return EXIT_FAILURE on post-init fatal errors
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user