org.custommonkey.xmlunit

## Class NodeTestException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - org.custommonkey.xmlunit.NodeTestException

All Implemented Interfaces:
  java.io.Serializable

    public class NodeTestException
    extends java.lang.Exception

Thrown by a NodeTest that fails.
Examples and more at xmlunit.sourceforge.net

See Also:
  `NodeTest`, Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`NodeTestException(java.lang.String message)` Constructor for message only
`NodeTestException(java.lang.String message, org.w3c.dom.Node node)` Constructor for specific node and message

### Method Summary

Methods
`java.lang.String` `getMessage()`
`org.w3c.dom.Node` `getNode()`
`boolean` `hasNode()`

### Methods inherited from class java.lang.Throwable

`addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### NodeTestException

    public NodeTestException(java.lang.String message,
                     org.w3c.dom.Node node)

Constructor for specific node and message

Parameters:
  `message` -
  `node` -

#### NodeTestException

    public NodeTestException(java.lang.String message)

Constructor for message only

Parameters:
  `message` -

### Method Detail

#### hasNode

    public boolean hasNode()

Returns:
  true if a node was passed to constructor

#### getNode

    public org.w3c.dom.Node getNode()

Returns:
  the node passed to constructor, or null if no node was passed

#### getMessage

    public java.lang.String getMessage()

Overrides:
  `getMessage` in class `java.lang.Throwable`
Returns:
  the exception message and node information if available