Next: Application Type Errors
Up: Exceptions and Control Flow
Previous: Primitive Exceptions
The procedure error raises the exception exn:user (which
contains an error string). The error procedure has three forms:
- (error symbol) creates a message string by concatentaing
"error: " with the string form of symbol.
- (error msg-string v )
creates a message string by concatenating msg-string with string
versions of the vs (as produced by the current error value
conversion handler; see section 9.4.1.9). A space is
inserted before each v.
- (error src-symbol format-string v )
creates a message string equivalent to the string created by:
(format (string-append "~s: " format-string) src-symbol v )
In all cases, the constructed message string is passed to
make-exn:user and the resulting exception is raised.
PLT