[ Event Handling | The ECLiPSe Built-In Predicates | Reference Manual | Alphabetic Index ]

reset_event_handler(+EventId)

Resets the handler for the event EventId to its default value
EventId
Atom or Integer.

Description

If EventId is an error number, the error handler is reset to its default value, cancelling any previous redefinition.

If EventId is an atom, any previously installed handler is uninstalled, and future occurrences of the event will cause an error (32).

Modes and Determinism

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:
    ?- event(hello).
    warning: no handler for event in hello
    yes.

    ?- set_event_handler(hello, writeln/1).    
    yes.

    ?- event(hello).
    hello

    ?- reset_event_handler(hello).
    yes.

    ?- 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