org.jboss.portal.test.framework.junit
Class ThrowableDecoder

java.lang.Object
  extended by org.jboss.portal.test.framework.junit.ThrowableDecoder

public class ThrowableDecoder
extends java.lang.Object

Version:
$Revision: 7228 $
Author:
Julien Viet

Constructor Summary
ThrowableDecoder()
           
 
Method Summary
static DriverResponse decode(java.lang.Throwable t)
          Decode a throwable into a suitable driver response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThrowableDecoder

public ThrowableDecoder()
Method Detail

decode

public static DriverResponse decode(java.lang.Throwable t)

Decode a throwable into a suitable driver response.

If the throwable or one of its causes are an instance of the class junit.framework.AssertionFailedError then a org.jboss.portal.common.test.driver.response.FailureResponse is returned.

Otherwise an org.jboss.portal.common.test.driver.response.ErrorResponse object is built with the throwable as argument and returned.

Parameters:
t - the throwable to decode.
Returns:
the proper driver response