diff options
author | matt dannenberg <matt.dannenberg@10gen.com> | 2014-10-27 14:51:07 -0400 |
---|---|---|
committer | matt dannenberg <matt.dannenberg@10gen.com> | 2014-10-28 10:32:40 -0400 |
commit | 18e5b98a603def84221460745f5f3e1566a7e775 (patch) | |
tree | c73a7531ca62ba643c26b6f09e57fbb078d50676 /src/mongo/util/background.cpp | |
parent | 80c750e543dbd2afa1b806fd9b617605a136706c (diff) | |
download | mongo-18e5b98a603def84221460745f5f3e1566a7e775.tar.gz |
SERVER-15492 do not swallow errors from subclasses' run() methods in BackgroundJob
Diffstat (limited to 'src/mongo/util/background.cpp')
-rw-r--r-- | src/mongo/util/background.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mongo/util/background.cpp b/src/mongo/util/background.cpp index 62fde25e8b6..41b6f8a8827 100644 --- a/src/mongo/util/background.cpp +++ b/src/mongo/util/background.cpp @@ -162,10 +162,8 @@ namespace mongo { run(); } catch ( std::exception& e ) { - error() << "backgroundjob " << threadName << " exception: " << e.what() << endl; - } - catch(...) { - error() << "uncaught exception in BackgroundJob " << threadName << endl; + error() << "backgroundjob " << threadName << " exception: " << e.what(); + throw e; } // We must cache this value so that we can use it after we leave the following scope. |