@superlayer/core
Version:
Superlayer's core local abstraction
24 lines • 722 B
JavaScript
export class SuperlayerError extends Error {
hint;
traceId;
constructor(message, hint, traceId) {
super(message);
this.hint = hint;
if (traceId) {
this.traceId = traceId;
}
const actualProto = new.target.prototype;
if (Object.setPrototypeOf) {
Object.setPrototypeOf(this, actualProto);
}
// Maintain proper stack trace for where our error was thrown
if (Error.captureStackTrace) {
Error.captureStackTrace(this, SuperlayerError);
}
this.name = 'SuperlayerError';
}
get [Symbol.toStringTag]() {
return 'SuperlayerError';
}
}
//# sourceMappingURL=SuperlayerError.js.map