Files
fredy/lib/errors.js

22 lines
566 B
JavaScript
Raw Normal View History

2025-12-11 10:40:55 +01:00
/*
* Copyright (c) 2026 by Christian Kellner.
2025-12-11 10:40:55 +01:00
* Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause
*/
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 {}
export { NoNewListingsWarning };
export default {
NoNewListingsWarning,
};