X-Git-Url: http://git.squeep.com/?p=squeep-indie-auther;a=blobdiff_plain;f=src%2Ferrors.js;fp=src%2Ferrors.js;h=9f4cb2b217be174a113bc4c4944af91fdd7a9dd7;hp=0000000000000000000000000000000000000000;hb=b0103b0d496262c438b40bc20304081dbfe41e73;hpb=8ed81748bce7cea7904cac7225b20a60cafdfc16 diff --git a/src/errors.js b/src/errors.js new file mode 100644 index 0000000..9f4cb2b --- /dev/null +++ b/src/errors.js @@ -0,0 +1,21 @@ +'use strict'; + +const { Errors } = require('@squeep/api-dingus'); + +/** + * A stack-less exception for general data issues. + */ +class ValidationError extends Error { + constructor(...args) { + super(...args); + delete this.stack; + } + + get name() { + return this.constructor.name; + } +} +module.exports = { + ...Errors, + ValidationError, +}; \ No newline at end of file