@instantdb/core
Version:
Instant's core local abstraction
28 lines • 845 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.InstantError = void 0;
class InstantError 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, InstantError);
}
this.name = 'InstantError';
}
get [Symbol.toStringTag]() {
return 'InstantError';
}
}
exports.InstantError = InstantError;
//# sourceMappingURL=InstantError.js.map