Module Guile.Error

val error : ?key:scm -> ?fn_name:string -> string -> scm

error ?key ?fn_name msg throws a Guile scheme error with tag key (defaults to the symbol ocaml-guile) with message msg, originating while executing fn_name.

Returns a dummy Guile scheme value as it does not return.

val catch : tag:scm -> ( unit -> unit ) -> ( scm -> scm -> unit ) -> unit

catch ~tag f handler runs f while catching any exceptions of with tag tag. If an exception is caught, the handler handler is called as handler key args.