aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorUdjinM6 <UdjinM6@dash.org>2016-11-02 21:59:09 +0300
committerUdjinM6 <UdjinM6@dash.org>2016-11-04 18:40:33 +0300
commitbd0de1386e1c7f9b875d52290de0d561c8d56bc9 (patch)
treed56a36399bb9fe64e9cd22e98ce31bc90fa19b40 /src/qt
parenta4fd8dff68369de497354574624b740f42175b1b (diff)
Fix exit codes:
- `--help`, `--version` etc should exit with `0` i.e. no error ("not enough args" case should still trigger an error) - error reading config file should exit with `1` Slightly refactor AppInitRPC/AppInitRawTx to return standard exit codes (EXIT_FAILURE/EXIT_SUCCESS) or CONTINUE_EXECUTION (-1)
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/bitcoin.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 9986af4957..fb66ff0079 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -573,7 +573,7 @@ int main(int argc, char *argv[])
{
HelpMessageDialog help(NULL, mapArgs.count("-version"));
help.showOrPrint();
- return 1;
+ return 0;
}
/// 5. Now that settings and translations are available, ask user for data directory
@@ -594,7 +594,7 @@ int main(int argc, char *argv[])
} catch (const std::exception& e) {
QMessageBox::critical(0, QObject::tr(PACKAGE_NAME),
QObject::tr("Error: Cannot parse configuration file: %1. Only use key=value syntax.").arg(e.what()));
- return false;
+ return 1;
}
/// 7. Determine network (and switch to network specific options)