diff options
author | Spencer T Brody <spencer@mongodb.com> | 2015-07-20 14:18:41 -0400 |
---|---|---|
committer | Spencer T Brody <spencer@mongodb.com> | 2015-07-22 10:42:46 -0400 |
commit | f37cf89f8eddc57dc1df5e3c0b0f2ae25388afd0 (patch) | |
tree | d745f438c704bf83c82697ac0ce681c07626c831 /src/mongo/shell/explainable.js | |
parent | 280b8e6c835bab826899a7696a1f5852e1221d53 (diff) | |
download | mongo-f37cf89f8eddc57dc1df5e3c0b0f2ae25388afd0.tar.gz |
SERVER-19493 Include 'code' field in thrown js Error objects where possible
Diffstat (limited to 'src/mongo/shell/explainable.js')
-rw-r--r-- | src/mongo/shell/explainable.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/shell/explainable.js b/src/mongo/shell/explainable.js index 7d6438fc7b3..68d83643ed8 100644 --- a/src/mongo/shell/explainable.js +++ b/src/mongo/shell/explainable.js @@ -31,7 +31,7 @@ var Explainable = (function() { var throwOrReturn = function(explainResult) { if (("ok" in explainResult && !explainResult.ok) || explainResult.$err) { - throw Error("explain failed: " + tojson(explainResult)); + throw _getErrorWithCode(explainResult, "explain failed: " + tojson(explainResult)); } return explainResult; |