Class MultiRuntimeException

  • All Implemented Interfaces:
    java.io.Serializable

    public final class MultiRuntimeException
    extends java.lang.RuntimeException
    Runtime exception to be thrown when multiple actions were executed and one or more failed. To be used when no fallback on resolver side is needed or is possible.
    Since:
    1.9.0
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<? extends java.lang.Throwable> throwables  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private MultiRuntimeException​(java.lang.String message, java.util.List<? extends java.lang.Throwable> throwables)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<? extends java.lang.Throwable> getThrowables()
      Returns the list of throwables that are wrapped in this exception.
      static void mayThrow​(java.lang.String message, java.util.List<? extends java.lang.Throwable> throwables)
      Helper method that receives a (non-null) message and (non-null) list of throwable, and following happens: if list is empty - nothing if list not empty - MultiRuntimeException is thrown wrapping all elements
      • Methods inherited from class java.lang.Throwable

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

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • throwables

        private final java.util.List<? extends java.lang.Throwable> throwables
    • Constructor Detail

      • MultiRuntimeException

        private MultiRuntimeException​(java.lang.String message,
                                      java.util.List<? extends java.lang.Throwable> throwables)
    • Method Detail

      • getThrowables

        public java.util.List<? extends java.lang.Throwable> getThrowables()
        Returns the list of throwables that are wrapped in this exception.
        Returns:
        The list of throwables, never null.
      • mayThrow

        public static void mayThrow​(java.lang.String message,
                                    java.util.List<? extends java.lang.Throwable> throwables)
        Helper method that receives a (non-null) message and (non-null) list of throwable, and following happens: