aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoin-cli.cpp
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2014-12-07 13:29:06 +0100
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2014-12-17 09:39:24 +0100
commit27df4123c433e5ad4e5592f0a8fbc40ca933865b (patch)
tree90ca518364768b73da454b6f782130e13fd48ef3 /src/bitcoin-cli.cpp
parent851dfc7f88d1b7c42534fffcfbdb2f1bcc473045 (diff)
downloadbitcoin-27df4123c433e5ad4e5592f0a8fbc40ca933865b.tar.xz
make all catch() arguments const
- I saw this on http://en.cppreference.com/w/cpp/language/try_catch and thought it would be a good idea - also unify used format to better be able to search for exception uses in our codebase
Diffstat (limited to 'src/bitcoin-cli.cpp')
-rw-r--r--src/bitcoin-cli.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index ea349b197e..51ab14785b 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -86,7 +86,7 @@ static bool AppInitRPC(int argc, char* argv[])
}
try {
ReadConfigFile(mapArgs, mapMultiArgs);
- } catch(std::exception &e) {
+ } catch (const std::exception& e) {
fprintf(stderr,"Error reading configuration file: %s\n", e.what());
return false;
}
@@ -206,7 +206,7 @@ int CommandLineRPC(int argc, char *argv[])
// Connection succeeded, no need to retry.
break;
}
- catch (const CConnectionFailed& e) {
+ catch (const CConnectionFailed&) {
if (fWait)
MilliSleep(1000);
else
@@ -214,10 +214,10 @@ int CommandLineRPC(int argc, char *argv[])
}
} while (fWait);
}
- catch (boost::thread_interrupted) {
+ catch (const boost::thread_interrupted&) {
throw;
}
- catch (std::exception& e) {
+ catch (const std::exception& e) {
strPrint = string("error: ") + e.what();
nRet = EXIT_FAILURE;
}
@@ -240,7 +240,7 @@ int main(int argc, char* argv[])
if(!AppInitRPC(argc, argv))
return EXIT_FAILURE;
}
- catch (std::exception& e) {
+ catch (const std::exception& e) {
PrintExceptionContinue(&e, "AppInitRPC()");
return EXIT_FAILURE;
} catch (...) {
@@ -252,7 +252,7 @@ int main(int argc, char* argv[])
try {
ret = CommandLineRPC(argc, argv);
}
- catch (std::exception& e) {
+ catch (const std::exception& e) {
PrintExceptionContinue(&e, "CommandLineRPC()");
} catch (...) {
PrintExceptionContinue(NULL, "CommandLineRPC()");