01: /*
02: * Copyright (c) 2006 World Wide Web Consortium,
03: *
04: * (Massachusetts Institute of Technology, European Research Consortium for
05: * Informatics and Mathematics, Keio University). All Rights Reserved. This
06: * work is distributed under the W3C(r) Software License [1] in the hope that
07: * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
08: * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
09: *
10: * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
11: */
12:
13: package org.w3c.dom.events;
14:
15: /**
16: * Event operations may throw an <code>EventException</code> as specified in
17: * their method descriptions.
18: * <p>See also the <a href='http://www.w3.org/TR/2006/WD-DOM-Level-3-Events-20060413'>
19: Document Object Model (DOM) Level 3 Events Specification
20: </a>.
21: * @since DOM Level 2
22: */
23: public class EventException extends RuntimeException {
24: public EventException(short code, String message) {
25: super (message);
26: this .code = code;
27: }
28:
29: public short code;
30: // EventExceptionCode
31: /**
32: * If the <code>Event.type</code> was not specified by initializing the
33: * event before the method was called. Specification of the
34: * <code>Event.type</code> as <code>null</code> or an empty string will
35: * also trigger this exception.
36: */
37: public static final short UNSPECIFIED_EVENT_TYPE_ERR = 0;
38: /**
39: * If the <code>Event</code> object is already dispatched in the tree.
40: * @since DOM Level 3
41: */
42: public static final short DISPATCH_REQUEST_ERR = 1;
43:
44: }
|