com.canoo.webtest.engine
Class WebTestException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.apache.tools.ant.BuildException
                  extended by com.canoo.webtest.engine.WebTestException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
StepExecutionException, StepFailedException

public class WebTestException
extends BuildException

Base class for WebTest exceptions.

Author:
Marc Guillemot
See Also:
Serialized Form

Constructor Summary
protected WebTestException(String message, Step failedStep)
           
protected WebTestException(String message, Step failedStep, Throwable cause)
           
protected WebTestException(String shortMessage, String messageEnd, Step failedStep)
           
protected WebTestException(String message, Throwable cause)
           
 
Method Summary
 void addDetail(String name, String value)
           
 List getDetails()
          Gets details of the exception
 String getShortMessage()
          Gets the short form of the message.
 String getUrlCurrentResponse()
          Gets the url of the current response when the exception occurred
 String toString()
           
 
Methods inherited from class org.apache.tools.ant.BuildException
getCause, getException, getLocation, printStackTrace, printStackTrace, printStackTrace, setLocation
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WebTestException

protected WebTestException(String message,
                           Throwable cause)

WebTestException

protected WebTestException(String message,
                           Step failedStep,
                           Throwable cause)
Parameters:
failedStep - may only be null for testing purposes *

WebTestException

protected WebTestException(String message,
                           Step failedStep)
Parameters:
failedStep - may only be null for testing purposes *

WebTestException

protected WebTestException(String shortMessage,
                           String messageEnd,
                           Step failedStep)
Parameters:
failedStep - may only be null for testing purposes *
Method Detail

getDetails

public List getDetails()
Gets details of the exception

Returns:
a list of NameValuePair

addDetail

public void addDetail(String name,
                      String value)

getShortMessage

public String getShortMessage()
Gets the short form of the message. This is what will be displayed as error cause in the report. The detailed information from getDetails() receives a special formatting. This may be the same than Throwable.getMessage() when for instance no detail information is available.

Returns:
the short message

toString

public String toString()
Overrides:
toString in class BuildException

getUrlCurrentResponse

public String getUrlCurrentResponse()
Gets the url of the current response when the exception occurred

Returns:
"-- none --" when no current response was available

Copyright © 2001-2007 Canoo Engineering AG, Basel. All rights reserved.