@nymphjs/nymph
Version:
Nymph.js - Nymph ORM
20 lines • 508 B
JavaScript
/**
* EntityInvalidDataError.
*
* This exception is meant to be thrown when an attempt to save an entity is
* made, and validation on the data of that entity fails.
*/
export class EntityInvalidDataError extends Error {
fields = [];
constructor(message) {
super(message);
this.name = 'EntityInvalidDataError';
}
addField(name) {
this.fields.push(name);
}
getFields() {
return this.fields;
}
}
//# sourceMappingURL=EntityInvalidDataError.js.map