summaryrefslogtreecommitdiff
path: root/src/mongo/unittest
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2017-12-08 18:49:23 -0500
committerMathias Stearn <mathias@10gen.com>2018-01-04 14:52:27 -0500
commit4abae20d3bc9c942664fca6364bea51ae533e644 (patch)
tree5be17ee43d80f4dd09735911f4801f17f0a7158a /src/mongo/unittest
parentd30abf7c53a992635d82b226acbb649106f5dfa2 (diff)
downloadmongo-4abae20d3bc9c942664fca6364bea51ae533e644.tar.gz
SERVER-32244 Better logging when a DBException escapes from a unittest
Diffstat (limited to 'src/mongo/unittest')
-rw-r--r--src/mongo/unittest/unittest.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/unittest/unittest.cpp b/src/mongo/unittest/unittest.cpp
index b574e3d6096..fa318762f18 100644
--- a/src/mongo/unittest/unittest.cpp
+++ b/src/mongo/unittest/unittest.cpp
@@ -297,6 +297,8 @@ Result* Suite::run(const std::string& filter, int runsPerTest) {
passes = true;
} catch (const TestAssertionFailureException& ae) {
err << ae.toString();
+ } catch (const DBException& e) {
+ err << " DBException: " << e.toString() << " in test " << tc->getName();
} catch (const std::exception& e) {
err << " std::exception: " << e.what() << " in test " << tc->getName();
} catch (int x) {