import WarpError from "./WarpError.js";
/** Error class for aborted operations. */
export default class OperationAbortedError extends WarpError {
    operation;
    reason;
    constructor(operation, options = {}) {
        const reason = options.reason !== undefined && options.reason !== '' ? options.reason : 'Operation was aborted';
        super(`Operation '${operation}' aborted: ${reason}`, 'OPERATION_ABORTED', options);
        this.operation = operation;
        this.reason = reason;
    }
}
