GNU Info

Info Node: (guile.info)Error Reporting

(guile.info)Error Reporting


Next: Dynamic Wind Prev: Exceptions Up: Control Mechanisms
Enter node , (file) or (file)node

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.

 - procedure: error msg args ...
     Raise an error with key `misc-error' and a message constructed by
     displaying MSG and writing ARGS.

 - primitive: scm-error key subr message args rest
     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 formating the
     corresponding members of ARGS: `~A' (was `%s') 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'.

 - primitive: strerror err
     Returns the Unix error message corresponding to ERR, an integer.

 - syntax: false-if-exception expr
     Returns the result of evaluating its argument; however if an
     exception occurs then `#f' is returned instead.


automatically generated by info2www version 1.2.2.9