Files
fredy/lib/errors.js
Christian Kellner c6cffe029d Release v1.0.0 🎉
2018-01-20 20:23:27 +01:00

17 lines
434 B
JavaScript
Executable File

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
}
}
}
class NoNewListingsError extends ExtendableError {
}
module.exports = {NoNewListingsError};