public class

MessagingException

extends Exception
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ com.google.code.javax.mail.MessagingException
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

The base class for all exceptions thrown by the Messaging classes

Summary

Constants
long serialVersionUID
[Expand]
Inherited Constants
From class java.lang.Exception
From class java.lang.Throwable
Fields
private Exception next The next exception in the chain.
[Expand]
Inherited Fields
From class java.lang.Throwable
Public Constructors
MessagingException()
Constructs a MessagingException with no detail message.
MessagingException(String s)
Constructs a MessagingException with the specified detail message.
MessagingException(String s, Exception e)
Constructs a MessagingException with the specified Exception and detail message.
Public Methods
synchronized Throwable getCause()
Overrides the getCause method of Throwable to return the next exception in the chain of nested exceptions.
synchronized Exception getNextException()
Get the next exception chained to this one.
synchronized boolean setNextException(Exception ex)
Add an exception to the end of the chain.
synchronized String toString()
Override toString method to provide information on nested exceptions.
[Expand]
Inherited Methods
From class java.lang.Throwable
From class java.lang.Object

Constants

private static final long serialVersionUID

Constant Value: -7569192289819959253 (0x96f4d3b738a7e02b)

Fields

private Exception next

The next exception in the chain.

Public Constructors

public MessagingException ()

Constructs a MessagingException with no detail message.

public MessagingException (String s)

Constructs a MessagingException with the specified detail message.

Parameters
s The detail message

public MessagingException (String s, Exception e)

Constructs a MessagingException with the specified Exception and detail message. The specified exception is chained to this exception.

Parameters
s The detail message
e The embedded exception

Public Methods

public synchronized Throwable getCause ()

Overrides the getCause method of Throwable to return the next exception in the chain of nested exceptions.

Returns
  • next Exception, null if none.

public synchronized Exception getNextException ()

Get the next exception chained to this one. If the next exception is a MessagingException, the chain may extend further.

Returns
  • next Exception, null if none.

public synchronized boolean setNextException (Exception ex)

Add an exception to the end of the chain. If the end is not a MessagingException, this exception cannot be added to the end.

Parameters
ex The new end of the Exception chain
Returns
  • true if this Exception was added, false otherwise.

public synchronized String toString ()

Override toString method to provide information on nested exceptions.