diff options
| author | Wladimir J. van der Laan <[email protected]> | 2015-10-20 16:59:33 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2015-10-20 17:06:28 +0200 |
| commit | e26a3f6713f8f12640cdb75aad48676e901e0c75 (patch) | |
| tree | d661b5d59dc32e59570910adf494155c4093faf6 /src/qt/bitcoin.cpp | |
| parent | Merge pull request #6841 (diff) | |
| parent | Chainparams: Translations: DRY: options and error strings (diff) | |
| download | discoin-e26a3f6713f8f12640cdb75aad48676e901e0c75.tar.xz discoin-e26a3f6713f8f12640cdb75aad48676e901e0c75.zip | |
Merge pull request #6235
55a8975 Chainparams: Translations: DRY: options and error strings (Jorge Timón)
f3525e2 Chainparams: Replace CBaseChainParams::Network enum with string constants (suggested by Wladimir) (Jorge Timón)
Diffstat (limited to 'src/qt/bitcoin.cpp')
| -rw-r--r-- | src/qt/bitcoin.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index ea7f86d18..89d2d44fd 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -597,8 +597,10 @@ int main(int argc, char *argv[]) // - Needs to be done before createOptionsModel // Check for -testnet or -regtest parameter (Params() calls are only valid after this clause) - if (!SelectParamsFromCommandLine()) { - QMessageBox::critical(0, QObject::tr("Bitcoin Core"), QObject::tr("Error: Invalid combination of -regtest and -testnet.")); + try { + SelectParams(ChainNameFromCommandLine()); + } catch(std::exception &e) { + QMessageBox::critical(0, QObject::tr("Bitcoin Core"), QObject::tr("Error: %1").arg(e.what())); return 1; } #ifdef ENABLE_WALLET |