2
* Copyright (c) 2003 World Wide Web Consortium,
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.
10
* [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
13
package org.apache.xerces.dom3;
16
* <code>DOMError</code> is an interface that describes an error.
17
* <p>See also the <a href='http://www.w3.org/TR/2003/CR-DOM-Level-3-Core-20031107'>Document Object Model (DOM) Level 3 Core Specification</a>.
20
public interface DOMError {
23
* The severity of the error described by the <code>DOMError</code> is
24
* warning. A <code>SEVERITY_WARNING</code> will not cause the
25
* processing to stop, unless <code>DOMErrorHandler.handleError()</code>
26
* returns <code>false</code>.
28
public static final short SEVERITY_WARNING = 1;
30
* The severity of the error described by the <code>DOMError</code> is
31
* error. A <code>SEVERITY_ERROR</code> may not cause the processing to
32
* stop if the error can be recovered, unless
33
* <code>DOMErrorHandler.handleError()</code> returns <code>false</code>.
35
public static final short SEVERITY_ERROR = 2;
37
* The severity of the error described by the <code>DOMError</code> is
38
* fatal error. A <code>SEVERITY_FATAL_ERROR</code> will cause the
39
* normal processing to stop and the return value of
40
* <code>DOMErrorHandler.handleError()</code> is ignored. If the
41
* implementation chooses to continue, the behavior is undefined.
43
public static final short SEVERITY_FATAL_ERROR = 3;
46
* The severity of the error, either <code>SEVERITY_WARNING</code>,
47
* <code>SEVERITY_ERROR</code>, or <code>SEVERITY_FATAL_ERROR</code>.
49
public short getSeverity();
52
* An implementation specific string describing the error that occurred.
54
public String getMessage();
57
* A <code>DOMString</code> indicating which related data is expected in
58
* <code>relatedData</code>. Users should refer to the specification of
59
* the error in order to find its <code>DOMString</code> type and
60
* <code>relatedData</code> definitions if any.
61
* <p ><b>Note:</b> As an example,
62
* <code>Document.normalizeDocument()</code> does generate warnings when
63
* the "split-cdata-sections" parameter is in use. Therefore, the method
64
* generates a <code>SEVERITY_WARNING</code> with <code>type</code>
65
* <code>"cdata-section-splitted"</code> and the first
66
* <code>CDATASection</code> node in document order resulting from the
67
* split is returned by the <code>relatedData</code> attribute.
69
public String getType();
72
* The related platform dependent exception if any.
74
public Object getRelatedException();
77
* The related <code>DOMError.type</code> dependent data if any.
79
public Object getRelatedData();
82
* The location of the error.
84
public DOMLocator getLocation();