Files
fredy/lib/errors.js
2025-12-11 10:40:55 +01:00

22 lines
566 B
JavaScript
Executable File

/*
* Copyright (c) 2025 by Christian Kellner.
* Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause
*/
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 NoNewListingsWarning extends ExtendableError {}
export { NoNewListingsWarning };
export default {
NoNewListingsWarning,
};