@simplito/privmx-webendpoint
Version:
PrivMX Web Endpoint library
21 lines (20 loc) • 622 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.NativeError = void 0;
class NativeError extends Error {
code;
scope;
fullMessage;
constructor(raw) {
super(raw.description || raw.full);
Object.setPrototypeOf(this, NativeError.prototype);
this.name = raw.name || "NativeError";
this.code = raw.code;
this.scope = raw.scope;
this.fullMessage = raw.full;
if (this.stack && raw.full) {
this.stack += `\n Caused by Native C++ Exception: ${raw.full}`;
}
}
}
exports.NativeError = NativeError;