Previous: srfi error-reporting rationale, Up: srfi error-reporting [Index]
The argument reason should be a string. The procedure error will signal an error, as described in R5RS, and it will report the message reason and the objects arg1, arg2, ...
What exactly constitutes “signalling” and “reporting” is not prescribed, because of the large variation in Scheme systems. So it is left to the implementor to do something reasonable. To that end, a few examples of possible behaviour are given.
thread-join!
mechanism in SRFI-18 on how this could be done.
An implementation might report more information than just reason and arg1... For instance, it might report the procedure name in which the error occured or even print a stack trace. However, this will require additional support in the Scheme implementation.
It is conceivable to allow error to be a special form, such as a macro, rather than a procedure. This might make providing information such as the source code location easier. This possibility has been considered, but rejected, for two reasons.
Previous: srfi error-reporting rationale, Up: srfi error-reporting [Index]