org.test4j.tools.commons
类 ExceptionWrapper

java.lang.Object
  继承者 org.test4j.tools.commons.ExceptionWrapper

public class ExceptionWrapper
extends Object

异常包装器

作者:
darui.wudr

构造方法摘要
ExceptionWrapper()
           
 
方法摘要
static RuntimeException getUndeclaredThrowableExceptionCaused(Throwable e)
          返回反射代理的本源异常
static void throwRuntimeException(String error, Throwable throwable)
          把Throwable包装为运行时异常抛出
若throwable==null,则什么事都不干
static void throwRuntimeException(Throwable throwable)
          把Throwable包装为运行时异常抛出
若throwable==null,则什么事都不干
static String toString(Throwable e)
           
static RuntimeException wrapdAdvisedException(Object object, Exception e)
          包装advised的异常信息,使提示更明显
static RuntimeException wrapWithRuntimeException(Throwable e)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

ExceptionWrapper

public ExceptionWrapper()
方法详细信息

throwRuntimeException

public static void throwRuntimeException(Throwable throwable)
把Throwable包装为运行时异常抛出
若throwable==null,则什么事都不干

参数:
throwable -

throwRuntimeException

public static void throwRuntimeException(String error,
                                         Throwable throwable)
把Throwable包装为运行时异常抛出
若throwable==null,则什么事都不干

参数:
error - 附加的异常消息,使异常信息更明确
throwable -

wrapdAdvisedException

public static RuntimeException wrapdAdvisedException(Object object,
                                                     Exception e)
包装advised的异常信息,使提示更明显

参数:
advised -
e -

getUndeclaredThrowableExceptionCaused

public static RuntimeException getUndeclaredThrowableExceptionCaused(Throwable e)
返回反射代理的本源异常

参数:
e -
返回:

wrapWithRuntimeException

public static RuntimeException wrapWithRuntimeException(Throwable e)

toString

public static String toString(Throwable e)


Copyright © 2013. All rights reserved.