1320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson/* 2320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson * Copyright (c) 2004 World Wide Web Consortium, 3320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson * 4320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson * (Massachusetts Institute of Technology, European Research Consortium for 5320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson * Informatics and Mathematics, Keio University). All Rights Reserved. This 6320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson * work is distributed under the W3C(r) Software License [1] in the hope that 7320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson * it will be useful, but WITHOUT ANY WARRANTY; without even the implied 8320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 9320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson * 10320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 11320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson */ 12320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson 13320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilsonpackage org.w3c.dom.ls; 14320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson 15320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson/** 16f33eae7e84eb6d3b0f4e86b59605bb3de73009f3Elliott Hughes * Parser or write operations may throw an <code>LSException</code> if the 17f33eae7e84eb6d3b0f4e86b59605bb3de73009f3Elliott Hughes * processing is stopped. The processing can be stopped due to a 18f33eae7e84eb6d3b0f4e86b59605bb3de73009f3Elliott Hughes * <code>DOMError</code> with a severity of 19f33eae7e84eb6d3b0f4e86b59605bb3de73009f3Elliott Hughes * <code>DOMError.SEVERITY_FATAL_ERROR</code> or a non recovered 20f33eae7e84eb6d3b0f4e86b59605bb3de73009f3Elliott Hughes * <code>DOMError.SEVERITY_ERROR</code>, or if 21f33eae7e84eb6d3b0f4e86b59605bb3de73009f3Elliott Hughes * <code>DOMErrorHandler.handleError()</code> returned <code>false</code>. 22f33eae7e84eb6d3b0f4e86b59605bb3de73009f3Elliott Hughes * <p ><b>Note:</b> As suggested in the definition of the constants in the 23f33eae7e84eb6d3b0f4e86b59605bb3de73009f3Elliott Hughes * <code>DOMError</code> interface, a DOM implementation may choose to 24f33eae7e84eb6d3b0f4e86b59605bb3de73009f3Elliott Hughes * continue after a fatal error, but the resulting DOM tree is then 25f33eae7e84eb6d3b0f4e86b59605bb3de73009f3Elliott Hughes * implementation dependent. 26320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model (DOM) Level 3 Load 27320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilsonand Save Specification</a>. 28320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson */ 29320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilsonpublic class LSException extends RuntimeException { 30320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson public LSException(short code, String message) { 31320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson super(message); 32320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson this.code = code; 33320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson } 34320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson public short code; 35320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson // LSExceptionCode 36320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson /** 37f33eae7e84eb6d3b0f4e86b59605bb3de73009f3Elliott Hughes * If an attempt was made to load a document, or an XML Fragment, using 38f33eae7e84eb6d3b0f4e86b59605bb3de73009f3Elliott Hughes * <code>LSParser</code> and the processing has been stopped. 39320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson */ 40320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson public static final short PARSE_ERR = 81; 41320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson /** 42f33eae7e84eb6d3b0f4e86b59605bb3de73009f3Elliott Hughes * If an attempt was made to serialize a <code>Node</code> using 43f33eae7e84eb6d3b0f4e86b59605bb3de73009f3Elliott Hughes * <code>LSSerializer</code> and the processing has been stopped. 44320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson */ 45320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson public static final short SERIALIZE_ERR = 82; 46320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson 47320c9890e8241fb0ad05de6fa5e6c3eb3aece159Jesse Wilson} 48