org.codehaus.cargo.util
Class ElementNotFoundException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.codehaus.cargo.util.ElementNotFoundException
- All Implemented Interfaces:
- Serializable
public class ElementNotFoundException
- extends RuntimeException
Exception raised when an XPath search returns no results.
- Version:
- $Id$
- See Also:
- Serialized Form
Constructor Summary |
ElementNotFoundException(String xpath,
org.dom4j.Element searched)
Constructor that provides a default message based on the XPath and element search. |
Method Summary |
org.dom4j.Element |
getSearched()
Getter that returns the XML Element which didn't match on the given XPath. |
String |
getXpath()
Getter for the XPath that didn't match. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
ElementNotFoundException
public ElementNotFoundException(String xpath,
org.dom4j.Element searched)
- Constructor that provides a default message based on the XPath and element search.
- Parameters:
xpath
- query that failedsearched
- context under which the query failed to match
getSearched
public org.dom4j.Element getSearched()
- Getter that returns the XML Element which didn't match on the given XPath.
- Returns:
- context of the XPath query.
getXpath
public String getXpath()
- Getter for the XPath that didn't match.
- Returns:
- the XPath query that failed
Copyright © 2004-2012 Codehaus. All Rights Reserved.