This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home. For a version of this page that may be more recent, see ErrorHandlingInLibraries in WG2's repo for R7RS-large.

Error­Handling­In­Libraries

cowan
2012-05-07 00:41:26
2history
source

These are ideas for how to specify errors in WG2 libraries. More than one can be used in a given package.

  1. Say "it is an error". That means users should avoid it and implementations can do what they want, including signalling an error, usefully extending the behavior, or making demons fly out of your nose.
  2. Say "an error is signalled". That means that the implementation behaves as if raise is called with an implementation-defined object.
  3. Say that raise is called on a newly allocated condition object of a specified type.
    1. Specify a predicate for testing the type of the condition.
    2. Specify a predicate and accessors for getting specified information out of the condition.
    3. Specify a predicate, accessors, and a constructor so that the user can create their own conditions of the type.