[ ECLiPSe Event built-in.|Group Index| Full Index]

reset_event_handler(+EventName)

Resets the handler for error number Number to its default value.

+EventName
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
EventName is not instantiated.
(5) Type error
EventName is neither atom nor integer.
(6) Range error
EventName 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_error_handler / 3, error / 2, error / 3, event / 1, set_event_handler / 2