blob: ba906577b3766a89584b6cf6795b2e84ddf6cc9a [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/**
The Android Open Source Projecte09fd9e2008-12-17 18:05:43 -080024 * The IIOInvalidTreeException provides notification about fails of
25 * IIOMetadataNodes tree parsing by IIOMetadata object.
26 *
27 * @since Android 1.0
The Android Open Source Project7c1b96a2008-10-21 07:00:00 -070028 */
29public class IIOInvalidTreeException extends IIOException {
The Android Open Source Projecte09fd9e2008-12-17 18:05:43 -080030
31 /**
32 * The offending node.
33 */
The Android Open Source Project7c1b96a2008-10-21 07:00:00 -070034 protected Node offendingNode = null;
35
36 /**
The Android Open Source Projecte09fd9e2008-12-17 18:05:43 -080037 * Instantiates an IIOInvalidTreeException with the specified detailed
38 * message and specified offending Node.
The Android Open Source Project7c1b96a2008-10-21 07:00:00 -070039 *
The Android Open Source Projecte09fd9e2008-12-17 18:05:43 -080040 * @param message
41 * the detailed message.
42 * @param offendingNode
43 * the offending node.
The Android Open Source Project7c1b96a2008-10-21 07:00:00 -070044 */
45 public IIOInvalidTreeException(String message, Node offendingNode) {
46 super(message);
47 this.offendingNode = offendingNode;
48 }
49
50 /**
The Android Open Source Projecte09fd9e2008-12-17 18:05:43 -080051 * Instantiates a new IIOInvalidTreeException with the specified detailed
52 * message and specified offending Node.
The Android Open Source Project7c1b96a2008-10-21 07:00:00 -070053 *
The Android Open Source Projecte09fd9e2008-12-17 18:05:43 -080054 * @param message
55 * the detailed message.
56 * @param cause
57 * the cause of this exception.
58 * @param offendingNode
59 * the offending node.
The Android Open Source Project7c1b96a2008-10-21 07:00:00 -070060 */
61 public IIOInvalidTreeException(String message, Throwable cause, Node offendingNode) {
62 super(message, cause);
63 this.offendingNode = offendingNode;
64 }
65
66 /**
67 * Gets the offending node.
68 *
69 * @return the offending node.
70 */
71 public Node getOffendingNode() {
72 return offendingNode;
73 }
74}