Merge pull request #12 from strongloop/SLA-370
Add error stack trace for ValidationError
This commit is contained in:
commit
2d072aa299
|
@ -1,3 +1,4 @@
|
|||
var util = require('util');
|
||||
/**
|
||||
* Module exports
|
||||
*/
|
||||
|
@ -604,6 +605,7 @@ function ValidationError(obj) {
|
|||
this.context = obj && obj.constructor && obj.constructor.modelName;
|
||||
|
||||
Error.call(this);
|
||||
};
|
||||
Error.captureStackTrace(this, this.constructor);
|
||||
}
|
||||
|
||||
ValidationError.prototype.__proto__ = Error.prototype;
|
||||
util.inherits(ValidationError, Error);
|
||||
|
|
Loading…
Reference in New Issue