You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
609 B
JavaScript
20 lines
609 B
JavaScript
"use strict";
|
|
|
|
// NOTE: We don't actually inherit from the real Error here, because collecting stacktraces is very expensive and largely useless for our purposes. Validatem's own error reporting is clear enough, and if not, that's a bug in Validatem anyway.
|
|
function ValidationError(message, properties) {
|
|
this.message = message;
|
|
|
|
Object.assign(this, {
|
|
path: [],
|
|
___validatem_isValidationError: true,
|
|
___validatem_errorVersion: 1
|
|
});
|
|
|
|
Object.assign(this, properties);
|
|
}
|
|
|
|
ValidationError.prototype.name = "ValidationError";
|
|
|
|
module.exports = ValidationError;
|
|
module.exports.__modulePath = __dirname;
|