"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ScriptException = exports.Exception = void 0;
class Exception extends Error {
    constructor(spec) {
        super(spec.message);
        this.name = spec.name;
        this.code = spec.code || spec.name;
        this.message = spec.message || spec.name;
        if (spec.retry != null) {
            this.retry = spec.retry;
        }
        this.details = spec.details;
    }
}
exports.Exception = Exception;
class ScriptException extends Exception {
    constructor(spec) {
        super(spec);
        this.scriptError = false;
        this.scriptError = spec.scriptError || false;
    }
}
exports.ScriptException = ScriptException;
//# sourceMappingURL=exception.js.map