Class MultiException

  • All Implemented Interfaces:
    java.io.Serializable

    @Deprecated(since="2021-05-27")
    public class MultiException
    extends java.lang.Exception
    Deprecated.
    The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
    Wraps multiple exceptions. Allows multiple exceptions to be thrown as a single exception. The MultiException itself should not be thrown instead one of the ifExceptionThrow* methods should be called instead.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      MultiException()
      Deprecated.
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void add​(java.lang.Throwable e)
      Deprecated.
       
      java.lang.Throwable getThrowable​(int i)
      Deprecated.
       
      java.util.List<java.lang.Throwable> getThrowables()
      Deprecated.
       
      void ifExceptionThrow()
      Deprecated.
      Throw a multiexception.
      void ifExceptionThrowMulti()
      Deprecated.
      Throw a multiexception.
      void ifExceptionThrowRuntime()
      Deprecated.
      Throw a Runtime exception.
      void ifExceptionThrowSuppressed()
      Deprecated.
      Throw an Exception, potentially with suppress.
      int size()
      Deprecated.
       
      java.lang.String toString()
      Deprecated.
       
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • MultiException

        public MultiException()
        Deprecated.
    • Method Detail

      • add

        public void add​(java.lang.Throwable e)
        Deprecated.
      • size

        public int size()
        Deprecated.
      • getThrowables

        public java.util.List<java.lang.Throwable> getThrowables()
        Deprecated.
      • getThrowable

        public java.lang.Throwable getThrowable​(int i)
        Deprecated.
      • ifExceptionThrow

        public void ifExceptionThrow()
                              throws java.lang.Exception
        Deprecated.
        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.
        Throws:
        java.lang.Exception - the Error or Exception if nested is 1, or the MultiException itself if nested is more than 1.
      • ifExceptionThrowRuntime

        public void ifExceptionThrowRuntime()
                                     throws java.lang.Error
        Deprecated.
        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.
        Throws:
        java.lang.Error - If this exception contains exactly 1 Error
        java.lang.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
        Deprecated.
        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.
        Throws:
        MultiException - the multiexception if there are nested exception
      • ifExceptionThrowSuppressed

        public void ifExceptionThrowSuppressed()
                                        throws java.lang.Exception
        Deprecated.
        Throw an Exception, potentially with suppress. If this multi exception is empty then no action is taken. If the first exception added is an Error or Exception, then it is throw with any additional exceptions added as suppressed. Otherwise a MultiException is thrown, with all exceptions added as suppressed.
        Throws:
        java.lang.Exception - the Error or Exception if at least one is added.
      • toString

        public java.lang.String toString()
        Deprecated.
        Overrides:
        toString in class java.lang.Throwable