Module Sarek_interp.Interp_error

type error =
  1. | Unbound_variable of {
    1. name : string;
    2. context : string;
    }
  2. | Type_conversion_error of {
    1. from_type : string;
    2. to_type : string;
    3. context : string;
    }
  3. | Array_bounds_error of {
    1. array_name : string;
    2. index : int;
    3. length : int;
    }
  4. | Unknown_intrinsic of {
    1. name : string;
    }
  5. | Unknown_function of {
    1. name : string;
    }
  6. | Pattern_match_failure of {
    1. context : string;
    }
  7. | Not_an_array of {
    1. expr : string;
    }
  8. | Not_a_record of {
    1. expr : string;
    }
  9. | Unsupported_operation of {
    1. operation : string;
    2. reason : string;
    }
  10. | BSP_deadlock of {
    1. message : string;
    }

Interpreter-specific errors

exception Interpreter_error of error
val error_to_string : error -> string

Convert error to human-readable string

val raise_error : error -> 'a

Raise an interpreter error