unboundedpress/node_modules/ava/lib/ava-error.js
2019-07-23 04:28:47 +00:00

15 lines
305 B
JavaScript

'use strict';
function AvaError(message) {
if (!(this instanceof AvaError)) {
throw new TypeError('Class constructor AvaError cannot be invoked without \'new\'');
}
this.message = message;
this.name = 'AvaError';
}
AvaError.prototype = Object.create(Error.prototype);
module.exports = AvaError;