01: package net.sf.saxon.dom;
02:
03: import org.w3c.dom.DOMException;
04:
05: /**
06: * DOM operations only raise exceptions in "exceptional" circumstances,
07: * i.e., when an operation is impossible to perform (either for logical
08: * reasons, because data is lost, or because the implementation has become
09: * unstable). In general, DOM methods return specific error values in ordinary
10: * processing situations, such as out-of-bound errors when using
11: * <code>NodeList</code> .
12: * <p> Implementations may raise other exceptions under other circumstances.
13: * For example, implementations may raise an implementation-dependent
14: * exception if a <code>null</code> argument is passed.
15: * <p>See also the <a href='http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510'>Document Object Model (DOM) Level 2 Specification</a>.
16: */
17: public class DOMExceptionImpl extends DOMException {
18:
19: public DOMExceptionImpl(short code, String message) {
20: super (code, message);
21: //this.code = code;
22: }
23:
24: public short code;
25: // ExceptionCode
26: // public static final short INDEX_SIZE_ERR = 1;
27: // public static final short DOMSTRING_SIZE_ERR = 2;
28: // public static final short HIERARCHY_REQUEST_ERR = 3;
29: // public static final short WRONG_DOCUMENT_ERR = 4;
30: // public static final short INVALID_CHARACTER_ERR = 5;
31: // public static final short NO_DATA_ALLOWED_ERR = 6;
32: // public static final short NO_MODIFICATION_ALLOWED_ERR = 7;
33: // public static final short NOT_FOUND_ERR = 8;
34: // public static final short NOT_SUPPORTED_ERR = 9;
35: // public static final short INUSE_ATTRIBUTE_ERR = 10;
36: /**
37: * @since DOM Level 2
38: */
39: public static final short INVALID_STATE_ERR = 11;
40: /**
41: * @since DOM Level 2
42: */
43: public static final short SYNTAX_ERR = 12;
44: /**
45: * @since DOM Level 2
46: */
47: public static final short INVALID_MODIFICATION_ERR = 13;
48: /**
49: * @since DOM Level 2
50: */
51: public static final short NAMESPACE_ERR = 14;
52: /**
53: * @since DOM Level 2
54: */
55: public static final short INVALID_ACCESS_ERR = 15;
56:
57: }
58:
59: //
60: // The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
61: // you may not use this file except in compliance with the License. You may obtain a copy of the
62: // License at http://www.mozilla.org/MPL/
63: //
64: // Software distributed under the License is distributed on an "AS IS" basis,
65: // WITHOUT WARRANTY OF ANY KIND, either express or implied.
66: // See the License for the specific language governing rights and limitations under the License.
67: //
68: // The Original Code is: all this file.
69: //
70: // The Initial Developer of the Original Code is Michael H. Kay
71: //
72: // Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
73: //
74: // Contributor(s): none
75: //
|