6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 // SAX error handler. 27 // http://www.saxproject.org 28 // No warranty; no copyright -- use this as you will. 29 // $Id: ErrorHandler.java,v 1.2 2004/11/03 22:44:52 jsuttor Exp $ 30 31 package org.xml.sax; 32 33 34 /** 35 * Basic interface for SAX error handlers. 36 * 37 * <blockquote> 38 * <em>This module, both source code and documentation, is in the 39 * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em> 40 * See <a href='http://www.saxproject.org'>http://www.saxproject.org</a> 41 * for further information. 42 * </blockquote> 43 * 44 * <p>If a SAX application needs to implement customized error 45 * handling, it must implement this interface and then register an 46 * instance with the XML reader using the 47 * {@link org.xml.sax.XMLReader#setErrorHandler setErrorHandler} 48 * method. The parser will then report all errors and warnings 49 * through this interface.</p> 50 * 51 * <p><strong>WARNING:</strong> If an application does <em>not</em> 52 * register an ErrorHandler, XML parsing errors will go unreported, 53 * except that <em>SAXParseException</em>s will be thrown for fatal errors. 54 * In order to detect validity errors, an ErrorHandler that does something 55 * with {@link #error error()} calls must be registered.</p> 56 * 57 * <p>For XML processing errors, a SAX driver must use this interface 58 * in preference to throwing an exception: it is up to the application 59 * to decide whether to throw an exception for different types of 60 * errors and warnings. Note, however, that there is no requirement that 61 * the parser continue to report additional errors after a call to 62 * {@link #fatalError fatalError}. In other words, a SAX driver class 63 * may throw an exception after reporting any fatalError. | 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package org.xml.sax; 27 28 29 /** 30 * Basic interface for SAX error handlers. 31 * 32 * <p>If a SAX application needs to implement customized error 33 * handling, it must implement this interface and then register an 34 * instance with the XML reader using the 35 * {@link org.xml.sax.XMLReader#setErrorHandler setErrorHandler} 36 * method. The parser will then report all errors and warnings 37 * through this interface.</p> 38 * 39 * <p><strong>WARNING:</strong> If an application does <em>not</em> 40 * register an ErrorHandler, XML parsing errors will go unreported, 41 * except that <em>SAXParseException</em>s will be thrown for fatal errors. 42 * In order to detect validity errors, an ErrorHandler that does something 43 * with {@link #error error()} calls must be registered.</p> 44 * 45 * <p>For XML processing errors, a SAX driver must use this interface 46 * in preference to throwing an exception: it is up to the application 47 * to decide whether to throw an exception for different types of 48 * errors and warnings. Note, however, that there is no requirement that 49 * the parser continue to report additional errors after a call to 50 * {@link #fatalError fatalError}. In other words, a SAX driver class 51 * may throw an exception after reporting any fatalError. |