TOM's mechanism of handling exceptional events and other such conditions is based on the conditions mechanism as provided by Common Lisp [gls].
The creation and issueing of conditions is handled through objects
defined in the TOM unit (see section unit tom):
Condition objects can
be raised or signaled, and any object can be thrown.
Condition handling (in contrast to creation) is part of the language. For this purpose, TOM provides a few special expressions:
condition_expression: catch_expression | bind_expression | unwind_expression ;
[Note: Currently, each
Condition instance is associated with a
ConditionClass instance; the instances of
defining a single inheritance hierarchy of condition classes. Since
real conditions need to be subclasses from
Condition, to carry
the extra state possibly needed, it seems a good idea to implement the
condition class hierarchy within the TOM class hierarchy. End note.]
Go to the first, previous, next, last section, table of contents.