"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ValidationError = exports.TimeoutError = exports.SecurityError = exports.CommandExecutionError = exports.TerminalError = void 0;
class TerminalError extends Error {
context;
constructor(message, context) {
super(message);
this.context = context;
this.name = this.constructor.name;
if (Error.captureStackTrace)
Error.captureStackTrace(this, this.constructor);
}
}
exports.TerminalError = TerminalError;
class CommandExecutionError extends TerminalError {
exitCode;
constructor(message, exitCode, context) {
super(message, context);
this.exitCode = exitCode;
}
}
exports.CommandExecutionError = CommandExecutionError;
class SecurityError extends TerminalError {
offendingCommand;
constructor(message, offendingCommand) {
super(message, { offendingCommand });
}
}
exports.SecurityError = SecurityError;
class TimeoutError extends TerminalError {
timeoutMs;
constructor(message, timeoutMs) {
super(message, { timeoutMs });
this.timeoutMs = timeoutMs;
}
}
exports.TimeoutError = TimeoutError;
class ValidationError extends TerminalError {
details;
constructor(message, details) {
super(message, details);
}
}
exports.ValidationError = ValidationError;
//# sourceMappingURL=errors.js.map