org.codehaus.cargo.util
Class ElementNotFoundException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 failed
searched - context under which the query failed to match
Method Detail

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.