Module Spoc_framework_registry.Framework_error

type framework_error =
  1. | Backend_not_found of {
    1. name : string;
    }
    (*

    Backend plugin not found in registry

    *)
  2. | No_backends_available of {
    1. reason : string;
    }
    (*

    No backends available (all failed is_available check)

    *)
  3. | Backend_unavailable of {
    1. name : string;
    2. reason : string;
    }
    (*

    Backend exists but is_available returned false

    *)
  4. | Plugin_registration_failed of {
    1. name : string;
    2. reason : string;
    }
    (*

    Failed to register plugin

    *)
  5. | Intrinsic_not_found of {
    1. name : string;
    2. backend : string option;
    }
    (*

    Intrinsic function not found for backend

    *)
  6. | Intrinsic_registration_failed of {
    1. name : string;
    2. reason : string;
    }
    (*

    Failed to register intrinsic

    *)
  7. | Cache_error of {
    1. operation : string;
    2. reason : string;
    }
    (*

    Cache operation failed (directory creation, file I/O, etc.)

    *)

Error types for framework operations

exception Framework_error of framework_error

Exception wrapper for framework errors

val raise_error : framework_error -> 'a

Raise a framework error

val to_string : framework_error -> string

Convert error to human-readable string

val print_error : framework_error -> unit

Print error to stderr

val with_default : default:'a -> (unit -> 'a) -> 'a

Get error with optional fallback