Package jadex.commons

Class MultiException

  • All Implemented Interfaces:
    java.io.Serializable

    public class MultiException
    extends java.lang.RuntimeException
    An exception that can store multiple causes.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.List<java.lang.Throwable> causes
      The exceptions.
      protected java.lang.String message
      The message.
    • Constructor Summary

      Constructors 
      Constructor Description
      MultiException()
      Create a new multi exception.
      MultiException​(java.lang.String message)
      Create a new multi exception.
      MultiException​(java.lang.String message, java.util.List<java.lang.Throwable> causes)
      Create a new multi exception.
      MultiException​(java.util.List<java.lang.Throwable> causes)
      Create a new multi exception.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addCause​(java.lang.Throwable cause)
      Add an exception.
      java.lang.Throwable[] getCauses()
      Get the causes.
      java.lang.String getMessage()
      Returns the detail message string of this throwable.
      void setText​(java.lang.String message)
      Set the message.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, 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

      • causes

        protected java.util.List<java.lang.Throwable> causes
        The exceptions.
      • message

        protected java.lang.String message
        The message.
    • Constructor Detail

      • MultiException

        public MultiException()
        Create a new multi exception.
      • MultiException

        public MultiException​(java.lang.String message)
        Create a new multi exception.
      • MultiException

        public MultiException​(java.util.List<java.lang.Throwable> causes)
        Create a new multi exception.
      • MultiException

        public MultiException​(java.lang.String message,
                              java.util.List<java.lang.Throwable> causes)
        Create a new multi exception.
    • Method Detail

      • addCause

        public void addCause​(java.lang.Throwable cause)
        Add an exception.
        Parameters:
        cause - The cause.
      • getCauses

        public java.lang.Throwable[] getCauses()
        Get the causes.
        Returns:
        The causes.
      • getMessage

        public java.lang.String getMessage()
        Returns the detail message string of this throwable.
        Overrides:
        getMessage in class java.lang.Throwable
        Returns:
        The detail message string of this Throwable instance (which may be null).
      • setText

        public void setText​(java.lang.String message)
        Set the message.
        Parameters:
        message - The message.