Skip to content

Commit

Permalink
SERVER-19741 WriteError and WriteConcernError are not Error instances
Browse files Browse the repository at this point in the history
  • Loading branch information
WaleyChen committed Aug 8, 2016
1 parent edcefd6 commit f800685
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/mongo/shell/bulk_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,9 @@ var _bulk_api_module = (function() {
};
};

WriteError.prototype = new Error();
WriteError.prototype.constructor = WriteError;

/**
* Wraps a write concern error
*/
Expand Down Expand Up @@ -497,6 +500,9 @@ var _bulk_api_module = (function() {
};
};

WriteConcernError.prototype = new Error();
WriteConcernError.prototype.constructor = WriteConcernError;

/**
* Keeps the state of an unordered batch so we can rewrite the results
* correctly after command execution
Expand Down

0 comments on commit f800685

Please sign in to comment.