diff options
author | Mathias Stearn <mathias@10gen.com> | 2017-12-08 18:49:23 -0500 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2018-01-04 14:52:27 -0500 |
commit | 4abae20d3bc9c942664fca6364bea51ae533e644 (patch) | |
tree | 5be17ee43d80f4dd09735911f4801f17f0a7158a /src/mongo/unittest | |
parent | d30abf7c53a992635d82b226acbb649106f5dfa2 (diff) | |
download | mongo-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.cpp | 2 |
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) { |