Package org.custommonkey.xmlunit
Class NodeTestException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.custommonkey.xmlunit.NodeTestException
-
- All Implemented Interfaces:
Serializable
public class NodeTestException extends Exception
Thrown by a NodeTest that fails.- See Also:
NodeTest, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NodeTestException(String message)Constructor for message onlyNodeTestException(String message, Node node)Constructor for specific node and message
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetMessage()NodegetNode()booleanhasNode()-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
NodeTestException
public NodeTestException(String message, Node node)
Constructor for specific node and message- Parameters:
message- exception messagenode- node the failure applies to
-
NodeTestException
public NodeTestException(String message)
Constructor for message only- Parameters:
message- exception message
-
-
Method Detail
-
hasNode
public boolean hasNode()
- Returns:
- true if a node was passed to constructor
-
getNode
public Node getNode()
- Returns:
- the node passed to constructor, or null if no node was passed
-
getMessage
public String getMessage()
- Overrides:
getMessagein classThrowable- Returns:
- the exception message and node information if available
-
-