blob: 8690b2bb65a4cefb26ec65ebbd0ef7b581a326ef [file] [log] [blame]
The Android Open Source Project7c1b96a2008-10-21 07:00:00 -07001/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18package javax.imageio.metadata;
19
20import org.w3c.dom.Node;
21import javax.imageio.IIOException;
22
23/**
24 * The IIOInvalidTreeException provides notification about
25 * fails of IIOMetadataNodes tree parsing by IIOMetadata object.
26 */
27public class IIOInvalidTreeException extends IIOException {
28
29 /** The offending node. */
30 protected Node offendingNode = null;
31
32 /**
33 * Instantiates an IIOInvalidTreeException with the
34 * specified detailed message and specified offending
35 * Node.
36 *
37 * @param message the detailed message.
38 * @param offendingNode the offending node.
39 */
40 public IIOInvalidTreeException(String message, Node offendingNode) {
41 super(message);
42 this.offendingNode = offendingNode;
43 }
44
45 /**
46 * Instantiates a new IIOInvalidTreeException with the
47 * specified detailed message and specified offending
48 * Node.
49 *
50 * @param message the detailed message.
51 * @param cause the cause of this exception.
52 * @param offendingNode the offending node
53 */
54 public IIOInvalidTreeException(String message, Throwable cause, Node offendingNode) {
55 super(message, cause);
56 this.offendingNode = offendingNode;
57 }
58
59 /**
60 * Gets the offending node.
61 *
62 * @return the offending node.
63 */
64 public Node getOffendingNode() {
65 return offendingNode;
66 }
67}