(guile.info.gz) Error Reporting
Info Catalog
(guile.info.gz) Exceptions
(guile.info.gz) Control Mechanisms
(guile.info.gz) Dynamic Wind
26.8 Procedures for Signaling Errors
====================================
Guile provides a set of convenience procedures for signaling error
conditions that are implemented on top of the exception primitives just
described.
-- Scheme Procedure: error msg args ...
Raise an error with key `misc-error' and a message constructed by
displaying MSG and writing ARGS.
-- Scheme Procedure: scm-error key subr message args data
-- C Function: scm_error_scm (key, subr, message, args, data)
Raise an error with key KEY. SUBR can be a string naming the
procedure associated with the error, or `#f'. MESSAGE is the
error message string, possibly containing `~S' and `~A' escapes.
When an error is reported, these are replaced by formatting the
corresponding members of ARGS: `~A' (was `%s' in older versions of
Guile) formats using `display' and `~S' (was `%S') formats using
`write'. DATA is a list or `#f' depending on KEY: if KEY is
`system-error' then it should be a list containing the Unix
`errno' value; If KEY is `signal' then it should be a list
containing the Unix signal number; otherwise it will usually be
`#f'.
-- Scheme Procedure: strerror err
-- C Function: scm_strerror (err)
Return the Unix error message corresponding to ERR, which must be
an integer value.
-- syntax: false-if-exception expr
Returns the result of evaluating its argument; however if an
exception occurs then `#f' is returned instead.
Info Catalog
(guile.info.gz) Exceptions
(guile.info.gz) Control Mechanisms
(guile.info.gz) Dynamic Wind
automatically generated byinfo2html