org.eclipse.jetty.util
类 MultiException

java.lang.Object
  继承者 java.lang.Throwable
      继承者 java.lang.Exception
          继承者 org.eclipse.jetty.util.MultiException
所有已实现的接口:
Serializable

public class MultiException
extends Exception

Wraps multiple exceptions. Allows multiple exceptions to be thrown as a single exception.

另请参见:
序列化表格

构造方法摘要
MultiException()
           
 
方法摘要
 void add(Throwable e)
           
 Throwable getThrowable(int i)
           
 List<Throwable> getThrowables()
           
 void ifExceptionThrow()
          Throw a multiexception.
 void ifExceptionThrowMulti()
          Throw a multiexception.
 void ifExceptionThrowRuntime()
          Throw a Runtime exception.
 void printStackTrace()
           
 void printStackTrace(PrintStream out)
           
 void printStackTrace(PrintWriter out)
           
 int size()
           
 String toString()
           
 
从类 java.lang.Throwable 继承的方法
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

MultiException

public MultiException()
方法详细信息

add

public void add(Throwable e)

size

public int size()

getThrowables

public List<Throwable> getThrowables()

getThrowable

public Throwable getThrowable(int i)

ifExceptionThrow

public void ifExceptionThrow()
                      throws Exception
Throw a multiexception. If this multi exception is empty then no action is taken. If it contains a single exception that is thrown, otherwise the this multi exception is thrown.

抛出:
Exception

ifExceptionThrowRuntime

public void ifExceptionThrowRuntime()
                             throws Error
Throw a Runtime exception. If this multi exception is empty then no action is taken. If it contains a single error or runtime exception that is thrown, otherwise the this multi exception is thrown, wrapped in a runtime exception.

抛出:
Error - If this exception contains exactly 1 Error
RuntimeException - If this exception contains 1 Throwable but it is not an error, or it contains more than 1 Throwable of any type.

ifExceptionThrowMulti

public void ifExceptionThrowMulti()
                           throws MultiException
Throw a multiexception. If this multi exception is empty then no action is taken. If it contains a any exceptions then this multi exception is thrown.

抛出:
MultiException

toString

public String toString()
覆盖:
Throwable 中的 toString

printStackTrace

public void printStackTrace()
覆盖:
Throwable 中的 printStackTrace

printStackTrace

public void printStackTrace(PrintStream out)
覆盖:
Throwable 中的 printStackTrace
另请参见:
Throwable.printStackTrace(java.io.PrintStream)

printStackTrace

public void printStackTrace(PrintWriter out)
覆盖:
Throwable 中的 printStackTrace
另请参见:
Throwable.printStackTrace(java.io.PrintWriter)


Copyright © 2013. All Rights Reserved.