< prev index next >

src/java.desktop/share/classes/javax/imageio/metadata/IIOInvalidTreeException.java

Print this page




  33  * by an {@code IIOMetadata} object to parse a tree of
  34  * {@code IIOMetadataNode}s fails.  The node that led to the
  35  * parsing error may be stored.  As with any parsing error, the actual
  36  * error may occur at a different point that that where it is
  37  * detected.  The node returned by {@code getOffendingNode}
  38  * should merely be considered as a clue to the actual nature of the
  39  * problem.
  40  *
  41  * @see IIOMetadata#setFromTree
  42  * @see IIOMetadata#mergeTree
  43  * @see IIOMetadataNode
  44  *
  45  */
  46 public class IIOInvalidTreeException extends IIOException {
  47     private static final long serialVersionUID = -1314083172544132777L;
  48 
  49     /**
  50      * The {@code Node} that led to the parsing error, or
  51      * {@code null}.
  52      */

  53     protected Node offendingNode = null;
  54 
  55     /**
  56      * Constructs an {@code IIOInvalidTreeException} with a
  57      * message string and a reference to the {@code Node} that
  58      * caused the parsing error.
  59      *
  60      * @param message a {@code String} containing the reason for
  61      * the parsing failure.
  62      * @param offendingNode the DOM {@code Node} that caused the
  63      * exception, or {@code null}.
  64      */
  65     public IIOInvalidTreeException(String message, Node offendingNode) {
  66         super(message);
  67         this.offendingNode = offendingNode;
  68     }
  69 
  70     /**
  71      * Constructs an {@code IIOInvalidTreeException} with a
  72      * message string, a reference to an exception that caused this




  33  * by an {@code IIOMetadata} object to parse a tree of
  34  * {@code IIOMetadataNode}s fails.  The node that led to the
  35  * parsing error may be stored.  As with any parsing error, the actual
  36  * error may occur at a different point that that where it is
  37  * detected.  The node returned by {@code getOffendingNode}
  38  * should merely be considered as a clue to the actual nature of the
  39  * problem.
  40  *
  41  * @see IIOMetadata#setFromTree
  42  * @see IIOMetadata#mergeTree
  43  * @see IIOMetadataNode
  44  *
  45  */
  46 public class IIOInvalidTreeException extends IIOException {
  47     private static final long serialVersionUID = -1314083172544132777L;
  48 
  49     /**
  50      * The {@code Node} that led to the parsing error, or
  51      * {@code null}.
  52      */
  53     @SuppressWarnings("serial") // Not statically typed as Serializable
  54     protected Node offendingNode = null;
  55 
  56     /**
  57      * Constructs an {@code IIOInvalidTreeException} with a
  58      * message string and a reference to the {@code Node} that
  59      * caused the parsing error.
  60      *
  61      * @param message a {@code String} containing the reason for
  62      * the parsing failure.
  63      * @param offendingNode the DOM {@code Node} that caused the
  64      * exception, or {@code null}.
  65      */
  66     public IIOInvalidTreeException(String message, Node offendingNode) {
  67         super(message);
  68         this.offendingNode = offendingNode;
  69     }
  70 
  71     /**
  72      * Constructs an {@code IIOInvalidTreeException} with a
  73      * message string, a reference to an exception that caused this


< prev index next >