[ Event Handling | Reference Manual | Alphabetic Index ]

# get_event_handler(+Event, -Predspec, -Module)

Returns the event handler for event/error Event and its home module Module.

Event
  atom or integer.
Predspec
  term which unifies with atom/integer.
Module
  atom or variable.

## Description

Given the event name/error number Event, Predspec is unified with the specification (i.e. a term of the form name/arity) of the current handler for event; Module is unified with its home module.

The events which exist are user defined; the errors which exist are implementation defined.

### Modes and Determinism

- get_event_handler(+, -, -) is semidet

### Fail Conditions

Fails if Event is not an event

### Exceptions

(4) instantiation fault
  Event is not instantiated.
(5) type error
  Event is not an atom nor integer.
(5) type error
  PredSpec is neither a variable nor of the form Atom/Integer.

## See Also

set_event_handler / 2, event / 1