Package 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.- See Also:
NodeTest
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private org.w3c.dom.Node
node
-
Constructor Summary
Constructors Constructor Description NodeTestException(java.lang.String message)
Constructor for message onlyNodeTestException(java.lang.String message, org.w3c.dom.Node node)
Constructor for specific node and message
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getMessage()
org.w3c.dom.Node
getNode()
boolean
hasNode()
-
-
-
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 classjava.lang.Throwable
- Returns:
- the exception message and node information if available
-
-