import { type FsCondition } from '../../../errors/index.ts'; /** * The error as guest CPython raises it for one condition: the builtin * exception a guest should be able to `except`, with CPython-on-Linux * numbering (a guest interpreter is platform-neutral, so the numbering * must not wobble with the host). */ export interface CPythonError { exception: string; errno: number; phrase: string; } export declare const CPYTHON: Record; /** The guest-python rendering for a condition. */ export declare function cpythonError(condition: FsCondition): CPythonError; export type GuestCode = FsCondition; /** The traceback monty renders for one of its own errors. */ export declare function displayError(err: unknown): string; /** * Build the guest-side exception for one condition, in CPython's * message shape. * * Args: * code: the condition, e.g. ENOENT. * path: the path the operation names. * target: rename's destination, when there is one. */ export declare function guestError(code: GuestCode, path: string, target?: string): Error; /** * Re-throw a mount failure under its python exception name: the monty * binding raises `err.name` as the matching guest exception type * (PYTHON_EXC_NAMES), so agent code can `except FileNotFoundError` * exactly as it does on the python host. Every named condition * converts (a non-empty rmdir is an OSError with errno 39, not a raw * JS error); a failure the vocabulary does not name passes through * untouched. * * Args: * err: whatever the mount op rejected with. * path: the path the operation names. */ export declare function asGuestError(err: unknown, path: string): unknown; //# sourceMappingURL=errors.d.ts.map