Files
fredy/lib/errors.js

16 lines
403 B
JavaScript
Raw Permalink Normal View History

2018-01-20 20:23:27 +01:00
class ExtendableError extends Error {
constructor(message) {
super(message);
this.name = this.constructor.name;
if (typeof Error.captureStackTrace === 'function') {
Error.captureStackTrace(this, this.constructor);
} else {
this.stack = new Error(message).stack;
2018-01-20 20:23:27 +01:00
}
}
2018-01-20 20:23:27 +01:00
}
class NoNewListingsWarning extends ExtendableError {}
2018-01-20 20:23:27 +01:00
module.exports = { NoNewListingsWarning };