octonom
Version:
Object Document Mapper for any database
28 lines • 950 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
class ExtendableError extends Error {
constructor(message, prototype) {
super(message);
// see https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md
Object.setPrototypeOf(this, prototype);
}
}
exports.ExtendableError = ExtendableError;
class SanitizationError extends ExtendableError {
// TODO: add value parameter!
constructor(message, reason, parent) {
super(message, SanitizationError.prototype);
this.reason = reason;
this.parent = parent;
}
}
exports.SanitizationError = SanitizationError;
class ValidationError extends ExtendableError {
constructor(message, reason, parent) {
super(message, ValidationError.prototype);
this.reason = reason;
this.parent = parent;
}
}
exports.ValidationError = ValidationError;
//# sourceMappingURL=errors.js.map