mirror of
https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir.git
synced 2025-08-11 21:23:54 -04:00
11 lines
290 B
JavaScript
11 lines
290 B
JavaScript
class AppError extends Error {
|
|
constructor(message, statusCode) {
|
|
super(message);
|
|
this.statusCode = statusCode || 500;
|
|
|
|
Object.setPrototypeOf(this, new.target.prototype);
|
|
|
|
Error.captureStackTrace(this, this.constructor);
|
|
}
|
|
}
|
|
module.exports = AppError;
|