Package javax.mail

Class MessagingException

    • Constructor Summary

      Constructors 
      Constructor Description
      MessagingException()
      Constructs a messaging exception with no detail message.
      MessagingException​(java.lang.String message)
      Constructs a messaging exception with the specified detail message.
      MessagingException​(java.lang.String message, java.lang.Exception exception)
      Constructs a messaging exception with the specified exception and detail message.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getMessage()
      Returns the message, including the message from any nested exception.
      java.lang.Exception getNextException()
      Returns the next exception chained to this one.
      void printStackTrace​(java.io.PrintStream out)  
      void printStackTrace​(java.io.PrintWriter out)  
      boolean setNextException​(java.lang.Exception exception)
      Adds an exception to the end of the chain.
      • Methods inherited from class java.lang.Throwable

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

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

      • MessagingException

        public MessagingException()
        Constructs a messaging exception with no detail message.
      • MessagingException

        public MessagingException​(java.lang.String message)
        Constructs a messaging exception with the specified detail message.
        Parameters:
        message - the detail message
      • MessagingException

        public MessagingException​(java.lang.String message,
                                  java.lang.Exception exception)
        Constructs a messaging exception with the specified exception and detail message.
        Parameters:
        message - the detail message
        exception - the embedded exception
    • Method Detail

      • getNextException

        public java.lang.Exception getNextException()
        Returns the next exception chained to this one. If the next exception is a messaging exception, the chain may extend further.
      • setNextException

        public boolean setNextException​(java.lang.Exception exception)
        Adds an exception to the end of the chain. If the end is not a messaging exception, this exception cannot be added to the end.
        Parameters:
        exception - the new end of the exception chain
        Returns:
        true if this exception was added, false otherwise.
      • getMessage

        public java.lang.String getMessage()
        Returns the message, including the message from any nested exception.
        Overrides:
        getMessage in class java.lang.Throwable
      • printStackTrace

        public void printStackTrace​(java.io.PrintStream out)
        Overrides:
        printStackTrace in class java.lang.Throwable
      • printStackTrace

        public void printStackTrace​(java.io.PrintWriter out)
        Overrides:
        printStackTrace in class java.lang.Throwable