UNPKG

@ents24/be-sure

Version:

NPM module for terse, 'throwy' validation

15 lines (14 loc) 443 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Provide a specific error class so that consuming code can * .. check whether a thrown error came from here * Extend Error to ensure stack trace https://javascript.info/custom-errors */ class ValidationError extends Error { constructor(message) { super(message); this.name = "ValidationError"; } } exports.default = ValidationError;