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