12005
|
1 |
/*
|
|
2 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
3 |
*
|
|
4 |
* This code is free software; you can redistribute it and/or modify it
|
|
5 |
* under the terms of the GNU General Public License version 2 only, as
|
|
6 |
* published by the Free Software Foundation. Oracle designates this
|
|
7 |
* particular file as subject to the "Classpath" exception as provided
|
|
8 |
* by Oracle in the LICENSE file that accompanied this code.
|
|
9 |
*
|
|
10 |
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
11 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
12 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
13 |
* version 2 for more details (a copy is included in the LICENSE file that
|
|
14 |
* accompanied this code).
|
|
15 |
*
|
|
16 |
* You should have received a copy of the GNU General Public License version
|
|
17 |
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
18 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
19 |
*
|
|
20 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
21 |
* or visit www.oracle.com if you need additional information or have any
|
|
22 |
* questions.
|
|
23 |
*/
|
|
24 |
|
|
25 |
/*
|
|
26 |
* This file is available under and governed by the GNU General Public
|
|
27 |
* License version 2 only, as published by the Free Software Foundation.
|
|
28 |
* However, the following notice accompanied the original version of this
|
|
29 |
* file and, per its terms, should not be removed:
|
|
30 |
*
|
|
31 |
* Copyright (c) 2004 World Wide Web Consortium,
|
|
32 |
*
|
|
33 |
* (Massachusetts Institute of Technology, European Research Consortium for
|
|
34 |
* Informatics and Mathematics, Keio University). All Rights Reserved. This
|
|
35 |
* work is distributed under the W3C(r) Software License [1] in the hope that
|
|
36 |
* it will be useful, but WITHOUT ANY WARRANTY; without even the implied
|
|
37 |
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
38 |
*
|
|
39 |
* [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
|
|
40 |
*/
|
|
41 |
|
|
42 |
package org.w3c.dom;
|
|
43 |
|
|
44 |
/**
|
|
45 |
* <code>DOMError</code> is an interface that describes an error.
|
|
46 |
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
|
25262
|
47 |
* @since 1.5, DOM Level 3
|
12005
|
48 |
*/
|
|
49 |
public interface DOMError {
|
|
50 |
// ErrorSeverity
|
|
51 |
/**
|
|
52 |
* The severity of the error described by the <code>DOMError</code> is
|
|
53 |
* warning. A <code>SEVERITY_WARNING</code> will not cause the
|
|
54 |
* processing to stop, unless <code>DOMErrorHandler.handleError()</code>
|
|
55 |
* returns <code>false</code>.
|
|
56 |
*/
|
|
57 |
public static final short SEVERITY_WARNING = 1;
|
|
58 |
/**
|
|
59 |
* The severity of the error described by the <code>DOMError</code> is
|
|
60 |
* error. A <code>SEVERITY_ERROR</code> may not cause the processing to
|
|
61 |
* stop if the error can be recovered, unless
|
|
62 |
* <code>DOMErrorHandler.handleError()</code> returns <code>false</code>.
|
|
63 |
*/
|
|
64 |
public static final short SEVERITY_ERROR = 2;
|
|
65 |
/**
|
|
66 |
* The severity of the error described by the <code>DOMError</code> is
|
|
67 |
* fatal error. A <code>SEVERITY_FATAL_ERROR</code> will cause the
|
|
68 |
* normal processing to stop. The return value of
|
|
69 |
* <code>DOMErrorHandler.handleError()</code> is ignored unless the
|
|
70 |
* implementation chooses to continue, in which case the behavior
|
|
71 |
* becomes undefined.
|
|
72 |
*/
|
|
73 |
public static final short SEVERITY_FATAL_ERROR = 3;
|
|
74 |
|
|
75 |
/**
|
|
76 |
* The severity of the error, either <code>SEVERITY_WARNING</code>,
|
|
77 |
* <code>SEVERITY_ERROR</code>, or <code>SEVERITY_FATAL_ERROR</code>.
|
|
78 |
*/
|
|
79 |
public short getSeverity();
|
|
80 |
|
|
81 |
/**
|
|
82 |
* An implementation specific string describing the error that occurred.
|
|
83 |
*/
|
|
84 |
public String getMessage();
|
|
85 |
|
|
86 |
/**
|
|
87 |
* A <code>DOMString</code> indicating which related data is expected in
|
|
88 |
* <code>relatedData</code>. Users should refer to the specification of
|
|
89 |
* the error in order to find its <code>DOMString</code> type and
|
|
90 |
* <code>relatedData</code> definitions if any.
|
|
91 |
* <p ><b>Note:</b> As an example,
|
|
92 |
* <code>Document.normalizeDocument()</code> does generate warnings when
|
|
93 |
* the "split-cdata-sections" parameter is in use. Therefore, the method
|
|
94 |
* generates a <code>SEVERITY_WARNING</code> with <code>type</code>
|
|
95 |
* <code>"cdata-sections-splitted"</code> and the first
|
|
96 |
* <code>CDATASection</code> node in document order resulting from the
|
|
97 |
* split is returned by the <code>relatedData</code> attribute.
|
|
98 |
*/
|
|
99 |
public String getType();
|
|
100 |
|
|
101 |
/**
|
|
102 |
* The related platform dependent exception if any.
|
|
103 |
*/
|
|
104 |
public Object getRelatedException();
|
|
105 |
|
|
106 |
/**
|
|
107 |
* The related <code>DOMError.type</code> dependent data if any.
|
|
108 |
*/
|
|
109 |
public Object getRelatedData();
|
|
110 |
|
|
111 |
/**
|
|
112 |
* The location of the error.
|
|
113 |
*/
|
|
114 |
public DOMLocator getLocation();
|
|
115 |
|
|
116 |
}
|