[ Event Handling | The ECLiPSe Built-In Predicates | Reference Manual | Alphabetic Index ]
reset_event_handler(+EventId)
Resets the handler for error number Number to its default value.
- +EventId
- Atom or Integer.
Description
If the event name is an error number, the error handler is reset to
its default value, cancelling any previous redefinition.
Otherwise, any previously installed handler is uninstalled, and
future occurrences of the event will cause an error (32).
Fail Conditions
None.
Resatisfiable
No.
Exceptions
- (4) instantiation fault
- EventId is not instantiated.
- (5) type error
- EventId is neither atom nor integer.
- (6) out of range
- EventId is integer, but not a valid error number.
Examples
Success:
[eclipse 1]: event(hello).
warning: no handler for event in hello
yes.
[eclipse 2]: set_event_handler(hello, writeln/1).
yes.
[eclipse 3]: event(hello).
hello
[eclipse 2]: reset_event_handler(hello).
yes.
[eclipse 3]: event(hello).
warning: no handler for event in hello
yes.
See Also
current_error / 1, get_event_handler / 3, error / 2, error / 3, event / 1, set_event_handler / 2