@etherspot/prime-sdk
Version:
Etherspot Prime (Account Abstraction) SDK
19 lines (18 loc) • 578 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.ValidationException = void 0;
const exception_1 = require("./exception");
class ValidationException extends exception_1.Exception {
static throw(property, constraints) {
const validationError = {
property,
constraints,
};
throw new ValidationException([validationError]);
}
constructor(errors) {
super(JSON.stringify(errors, null, 2));
this.errors = errors;
}
}
exports.ValidationException = ValidationException;
;