UNPKG

305 BJavaScriptView Raw
1'use strict';
2
3function AvaError(message) {
4 if (!(this instanceof AvaError)) {
5 throw new TypeError('Class constructor AvaError cannot be invoked without \'new\'');
6 }
7
8 this.message = message;
9 this.name = 'AvaError';
10}
11
12AvaError.prototype = Object.create(Error.prototype);
13
14module.exports = AvaError;