portfree
Version:
A cross-platform CLI tool for managing processes running on specific ports
24 lines • 802 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ValidationError = void 0;
/**
* Custom error class for validation errors
* Used when user input or data validation fails
*/
class ValidationError extends Error {
/**
* Create a new ValidationError
* @param message - Error message describing the validation failure
*/
constructor(message) {
super(message);
this.name = 'ValidationError';
this.code = 'VALIDATION_ERROR';
// Maintains proper stack trace for where our error was thrown (only available on V8)
if (Error.captureStackTrace) {
Error.captureStackTrace(this, ValidationError);
}
}
}
exports.ValidationError = ValidationError;
//# sourceMappingURL=validation-error.js.map