@@ -496,7 +496,7 @@ void BitcoinApplication::shutdownResult(int retval)
496
496
void BitcoinApplication::handleRunawayException (const QString &message)
497
497
{
498
498
QMessageBox::critical (0 , " Runaway exception" , BitcoinGUI::tr (" A fatal error occurred. Bitcoin can no longer continue safely and will quit." ) + QString (" \n\n " ) + message);
499
- ::exit (1 );
499
+ ::exit (EXIT_FAILURE );
500
500
}
501
501
502
502
WId BitcoinApplication::getMainWinId () const
@@ -573,28 +573,28 @@ int main(int argc, char *argv[])
573
573
{
574
574
HelpMessageDialog help (NULL , mapArgs.count (" -version" ));
575
575
help.showOrPrint ();
576
- return 0 ;
576
+ return EXIT_SUCCESS ;
577
577
}
578
578
579
579
// / 5. Now that settings and translations are available, ask user for data directory
580
580
// User language is set up: pick a data directory
581
581
if (!Intro::pickDataDirectory ())
582
- return 0 ;
582
+ return EXIT_SUCCESS ;
583
583
584
584
// / 6. Determine availability of data directory and parse bitcoin.conf
585
585
// / - Do not call GetDataDir(true) before this step finishes
586
586
if (!boost::filesystem::is_directory (GetDataDir (false )))
587
587
{
588
588
QMessageBox::critical (0 , QObject::tr (PACKAGE_NAME),
589
589
QObject::tr (" Error: Specified data directory \" %1\" does not exist." ).arg (QString::fromStdString (mapArgs[" -datadir" ])));
590
- return 1 ;
590
+ return EXIT_FAILURE ;
591
591
}
592
592
try {
593
593
ReadConfigFile (GetArg (" -conf" , BITCOIN_CONF_FILENAME), mapArgs, mapMultiArgs);
594
594
} catch (const std::exception& e) {
595
595
QMessageBox::critical (0 , QObject::tr (PACKAGE_NAME),
596
596
QObject::tr (" Error: Cannot parse configuration file: %1. Only use key=value syntax." ).arg (e.what ()));
597
- return 1 ;
597
+ return EXIT_FAILURE ;
598
598
}
599
599
600
600
// / 7. Determine network (and switch to network specific options)
@@ -608,7 +608,7 @@ int main(int argc, char *argv[])
608
608
SelectParams (ChainNameFromCommandLine ());
609
609
} catch (std::exception &e) {
610
610
QMessageBox::critical (0 , QObject::tr (PACKAGE_NAME), QObject::tr (" Error: %1" ).arg (e.what ()));
611
- return 1 ;
611
+ return EXIT_FAILURE ;
612
612
}
613
613
#ifdef ENABLE_WALLET
614
614
// Parse URIs on command line -- this can affect Params()
@@ -630,7 +630,7 @@ int main(int argc, char *argv[])
630
630
// - Do this after creating app and setting up translations, so errors are
631
631
// translated properly.
632
632
if (PaymentServer::ipcSendCommandLine ())
633
- exit (0 );
633
+ exit (EXIT_SUCCESS );
634
634
635
635
// Start up the payment server early, too, so impatient users that click on
636
636
// bitcoin: links repeatedly have their payment requests routed to this process:
0 commit comments