import WarpError from "./WarpError.js";
/**
 * Error class for Writer operations.
 *
 * Follows the standard WarpError subclass constructor shape:
 * (message, options), with the writer-specific error code carried by options.
 *
 * ## Error Codes
 *
 * | Code | Description |
 * |------|-------------|
 * | `EMPTY_PATCH` | Patch commit attempted with zero operations |
 * | `WRITER_REF_ADVANCED` | Writer ref moved since beginPatch() |
 * | `WRITER_CAS_CONFLICT` | Compare-and-swap failure during commit |
 * | `PERSIST_WRITE_FAILED` | Git persistence operation failed |
 * | `NO_BLOB_STORAGE` | Content attachment attempted without blob storage |
 * | `WRITER_ERROR` | Generic/default writer error |
 */
export default class WriterError extends WarpError {
    expectedSha = undefined;
    actualSha = undefined;
    constructor(message, options = {}) {
        super(message, 'WRITER_ERROR', options);
        this.cause = options.cause;
    }
}
