summaryrefslogtreecommitdiff
path: root/src/mongo/shell/bulk_api.js
diff options
context:
space:
mode:
authorJason Carey <jcarey@argv.me>2015-08-03 13:54:40 -0400
committerJason Carey <jcarey@argv.me>2015-08-04 14:07:23 -0400
commit1febdbe599d63268fbc5b8415587a0c489f48874 (patch)
treea089e50757285b91efd0c08557c9fc2cdbe0d9e4 /src/mongo/shell/bulk_api.js
parentcfe4562fb64b756ed4fe7389f924b52cf8595f9f (diff)
downloadmongo-1febdbe599d63268fbc5b8415587a0c489f48874.tar.gz
SERVER-19727 captureStackTrace bulk_api emulation
form stack traces that have more information and look more like v8 captureStackTrace stack traces.
Diffstat (limited to 'src/mongo/shell/bulk_api.js')
-rw-r--r--src/mongo/shell/bulk_api.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/shell/bulk_api.js b/src/mongo/shell/bulk_api.js
index 89cb762f1e8..84e40d83581 100644
--- a/src/mongo/shell/bulk_api.js
+++ b/src/mongo/shell/bulk_api.js
@@ -369,6 +369,7 @@ var _bulk_api_module = (function() {
this.toString = function() {
return "BulkWriteError(" + this.tojson() + ")";
}
+ this.stack = this.toString() + "\n" + (new Error().stack);
this.toResult = function() {
return new BulkWriteResult(bulkResult, singleBatchType, writeConcern);
@@ -415,6 +416,7 @@ var _bulk_api_module = (function() {
this.toString = function() {
return "WriteCommandError(" + this.tojson() + ")";
}
+ this.stack = this.toString() + "\n" + (new Error().stack);
this.shellPrint = function() {
return this.toString();