Next: Dynamic Wind, Previous: Exceptions, Up: Control Mechanisms [Contents][Index]
Guile provides a set of convenience procedures for signaling error conditions that are implemented on top of the exception primitives just described.
Raise an error with key misc-error and a message constructed by
displaying msg and writing arg ....
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; If
key is out-of-range, wrong-type-arg,
or keyword-argument-error,
it is a list containing the bad value; otherwise
it will usually be #f.
Return the Unix error message corresponding to err, an integer
errno value.
When setlocale has been called (see Locales), the message
is in the language and charset of LC_MESSAGES. (This is done
by the C library.)
Returns the result of evaluating its argument; however
if an exception occurs then #f is returned instead.
Next: Dynamic Wind, Previous: Exceptions, Up: Control Mechanisms [Contents][Index]