deno_hello/src/validation.ts
2021-02-19 12:37:19 +01:00

7 lines
233 B
TypeScript

/**
* Custom error used to express input validation.
* The message must describe to the external user how to correct its input.
*
@example * `throw new ValidationError("Bad id")`
*/
export class ValidationError extends Error {}