During the processing of an event with its handler, some unexpected circumstance may cause an exception to occur. This is not quite the same as a try ... catch exception as defined in ECMAScript.
Assuming that a function handler were called, it would be passed a reference to an EventException object from which it could obtain a code value that describes the cause of the exception. Perhaps, the onError handler may be used to trap this but an implementation might choose to provide an onException handler.
At DOM level 2, only the UNSPECIFIED_EVENT_TYPE_ERR is defined as a static constant. This has the value 0. Other event types may be defined in later versions of the DOM specification.