diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2013-03-09 12:02:57 -0500 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2013-04-03 19:57:53 -0400 |
commit | b31499ec72edd1554d4612d1b54808fce0360e14 (patch) | |
tree | a2d03852b9fd6e9595470210479f212ccf4313f1 /src/bitcoinrpc.cpp | |
parent | 21eb5adadbe3110a8708f2570185566e1f137a49 (diff) |
Clean up shutdown process
Diffstat (limited to 'src/bitcoinrpc.cpp')
-rw-r--r-- | src/bitcoinrpc.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index 53b3635753..9c126fc3da 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -1221,13 +1221,14 @@ int CommandLineRPC(int argc, char *argv[]) strPrint = write_string(result, true); } } - catch (std::exception& e) - { + catch (boost::thread_interrupted) { + throw; + } + catch (std::exception& e) { strPrint = string("error: ") + e.what(); nRet = 87; } - catch (...) - { + catch (...) { PrintException(NULL, "CommandLineRPC()"); } @@ -1265,6 +1266,9 @@ int main(int argc, char *argv[]) return CommandLineRPC(argc, argv); } } + catch (boost::thread_interrupted) { + throw; + } catch (std::exception& e) { PrintException(&e, "main()"); } catch (...) { |