
event(+EventId)

   The event EventId is raised and the corresponding error handler is
executed.



Arguments
   +EventId            Atom or Integer.

Type
   Event Handling

Description
   The event EventId is raised and the corresponding error handler is
   executed.


   Other ways to raise events are by



   - one of the builtins error/2 or error/3.
   - posting an event from external code using ec_post_event().
   - an interrupt whose handler has been specified as event/1.

   The latter two have the effect of dynamically inserting an event/1
   goal into the current execution at the next synchronous point,
   which is usually just before the next predicate call.




Resatisfiable
      No.

Fail Conditions
      Fails if the handler fails.



Exceptions
    32 --- No handler is associated to EventId, or EventId    	is neither atom nor integer.

Examples
       [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
    yes.






See Also
   error / 2, error / 3, reset_event_handler / 1, set_event_handler / 2, set_interrupt_handler / 2
