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