01: /*
02: * Copyright (c) 2002 World Wide Web Consortium,
03: * (Massachusetts Institute of Technology, Institut National de
04: * Recherche en Informatique et en Automatique, Keio University). All
05: * Rights Reserved. This program is distributed under the W3C's Software
06: * Intellectual Property License. This program is distributed in the
07: * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
08: * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
09: * PURPOSE.
10: * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
11: */
12:
13: package org.w3c.dom;
14:
15: /**
16: * <code>DOMErrorHandler</code> is a callback interface that the DOM
17: * implementation can call when reporting errors that happens while
18: * processing XML data, or when doing some other processing (e.g. validating
19: * a document).
20: * <p>The application that is using the DOM implementation is expected to
21: * implement this interface.How does one register an error handler in the
22: * core? Passed as an argument to super-duper-normalize or registered on the
23: * DOMImplementation?
24: * <p>See also the <a href='http://www.w3.org/TR/2002/WD-DOM-Level-3-Core-20020114'>Document Object Model (DOM) Level 3 Core Specification</a>.
25: */
26: public interface DOMErrorHandler {
27: /**
28: * This method is called on the error handler when an error occures.
29: * @param error The error object that describes the error, this object
30: * may be reused by the DOM implementation across multiple calls to
31: * the handleEvent method.
32: * @return If the handleError method returns <code>true</code> the DOM
33: * implementation should continue as if the error didn't happen when
34: * possible, if the method returns <code>false</code> then the DOM
35: * implementation should stop the current processing when possible.
36: */
37: public boolean handleError(DOMError error);
38:
39: }
|