mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-06 12:47:13 +02:00
19 lines
No EOL
384 B
JavaScript
19 lines
No EOL
384 B
JavaScript
/* jslint node: true */
|
|
'use strict';
|
|
|
|
class EnigError extends Error {
|
|
constructor(message) {
|
|
super(message);
|
|
|
|
this.name = this.constructor.name;
|
|
this.message = message;
|
|
|
|
if(typeof Error.captureStackTrace === 'function') {
|
|
Error.captureStackTrace(this, this.constructor);
|
|
} else {
|
|
this.stack = (new Error(message)).stack;
|
|
}
|
|
}
|
|
}
|
|
|
|
exports.EnigError = EnigError; |