mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
Release v1.0.0 🎉
This commit is contained in:
16
lib/errors.js
Executable file
16
lib/errors.js
Executable file
@@ -0,0 +1,16 @@
|
||||
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};
|
||||
Reference in New Issue
Block a user