UNPKG

@supercharge/promise-pool

Version:

Map-like, concurrent promise processing for Node.js

22 lines (21 loc) 629 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.ValidationError = void 0; class ValidationError extends Error { /** * Create a new instance for the given `message`. */ constructor(message) { super(message); if (Error.captureStackTrace && typeof Error.captureStackTrace === 'function') { Error.captureStackTrace(this, this.constructor); } } /** * Returns a validation error with the given `message`. */ static createFrom(message) { return new this(message); } } exports.ValidationError = ValidationError;