Class MultipleException

  • All Implemented Interfaces:
    java.io.Serializable

    
    public final class MultipleException
    extends RuntimeException
                        

    Exception with a list of causes. Cause is null as it can't be told which one of the list is the cause.

    A coded multiple exception should be created this way:

    CodedException(400, "Many errors", MultipleException())

    To pass a list of causes

    CodedException (500, "Error", *list)
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final List<Throwable> causes
      private final Throwable cause
      private final String message
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final List<Throwable> getCauses() List of causing exceptions.
      • Methods inherited from class kotlin.Throwable

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

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MultipleException

        MultipleException(Throwable causes)
      • MultipleException

        MultipleException(String message, List<Throwable> causes)
      • MultipleException

        MultipleException(String message, Throwable causes)
      • MultipleException

        MultipleException(List<Throwable> causes, String message)
    • Method Detail

      • getCauses

         final List<Throwable> getCauses()

        List of causing exceptions.