diff options
author | Mathias Stearn <mathias@10gen.com> | 2017-08-01 14:31:26 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2017-08-16 16:28:02 -0400 |
commit | c593ea7bb9815ced064ad8aa7ffa206fa94757c4 (patch) | |
tree | 38ca084a7db5d9de79c69d1384bdc1ee4d9cecad /src/mongo/db/curop.cpp | |
parent | 40036f67d0c15e2cd319e82f8c6a1e691fb74806 (diff) | |
download | mongo-c593ea7bb9815ced064ad8aa7ffa206fa94757c4.tar.gz |
SERVER-30580 Make DBException hold a Status
Diffstat (limited to 'src/mongo/db/curop.cpp')
-rw-r--r-- | src/mongo/db/curop.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp index 9026b2835c4..49dd733dd44 100644 --- a/src/mongo/db/curop.cpp +++ b/src/mongo/db/curop.cpp @@ -507,10 +507,9 @@ string OpDebug::report(Client* client, s << " writeConflicts:" << writeConflicts; } - if (!exceptionInfo.empty()) { - s << " exception: " << redact(exceptionInfo.msg); - if (exceptionInfo.code) - s << " code:" << exceptionInfo.code; + if (!exceptionInfo.isOK()) { + s << " exception: " << redact(exceptionInfo.reason()); + s << " code:" << exceptionInfo.code(); } s << " numYields:" << curop.numYields(); @@ -605,8 +604,9 @@ void OpDebug::append(const CurOp& curop, lockStats.report(&locks); } - if (!exceptionInfo.empty()) { - exceptionInfo.append(b, "exception", "exceptionCode"); + if (!exceptionInfo.isOK()) { + b.append("exception", exceptionInfo.reason()); + b.append("exceptionCode", exceptionInfo.code()); } OPDEBUG_APPEND_NUMBER(nreturned); |