01: /*
02: ItsNat Java Web Application Framework
03: Copyright (C) 2007 Innowhere Software Services S.L., Spanish Company
04: Author: Jose Maria Arranz Santamaria
05:
06: This program is free software: you can redistribute it and/or modify
07: it under the terms of the GNU Affero General Public License as published by
08: the Free Software Foundation, either version 3 of the License, or
09: (at your option) any later version. See the GNU Affero General Public
10: License for more details. See the copy of the GNU Affero General Public License
11: included in this program. If not, see <http://www.gnu.org/licenses/>.
12: */
13:
14: package org.itsnat.core;
15:
16: import org.w3c.dom.Node;
17:
18: /**
19: * Is throw by ItsNat when a DOM node is the source of the error.
20: *
21: * @author Jose Maria Arranz Santamaria
22: */
23: public class ItsNatDOMException extends ItsNatException {
24: protected Node node;
25:
26: /**
27: * Creates a new instance.
28: *
29: * @param ex the cause of this exception, is submitted to the parent exception.
30: * @param node the node involved.
31: */
32: public ItsNatDOMException(Throwable ex, Node node) {
33: super (ex);
34: this .node = node;
35: }
36:
37: /**
38: * Creates a new instance.
39: *
40: * @param message the detail message, is submitted to the parent exception.
41: * @param node the node involved.
42: */
43: public ItsNatDOMException(String message, Node node) {
44: super (message);
45: this .node = node;
46: }
47:
48: /**
49: * Creates a new instance.
50: *
51: * @param message the detail message, is submitted to the parent exception.
52: * @param ex the cause of this exception, is submitted to the parent exception.
53: * @param node the node involved.
54: */
55: public ItsNatDOMException(String message, Throwable ex, Node node) {
56: super (message, ex);
57: this .node = node;
58: }
59:
60: /**
61: * Returns the node involved.
62: *
63: * @return the node involved.
64: */
65: public Node getOffendingNode() {
66: return node;
67: }
68: }
|