javax.mail
Class MessagingException
Exception
javax.mail.MessagingException
public class MessagingException
extends Exception
The base class for all exceptions thrown by the Messaging classes.
MessagingException() - Constructs a MessagingException with no detail message.
|
MessagingException(String message) - Constructs a MessagingException with the specified detail message.
|
MessagingException(String message, Exception exception) - Constructs a MessagingException with the specified Exception and detail
message.
|
MessagingException
public MessagingException()
Constructs a MessagingException with no detail message.
MessagingException
public MessagingException(String message)
Constructs a MessagingException with the specified detail message.
message
- the detail message
MessagingException
public MessagingException(String message,
Exception exception)
Constructs a MessagingException with the specified Exception and detail
message. The specified exception is chained to this exception.
message
- the detail messageexception
- the embedded exception
getMessage
public String getMessage()
Produce the message, include the message from the nested exception
if there is one.
getNextException
public Exception getNextException()
Get the next exception chained to this one.
If the next exception is a MessagingException, the chain may extend
further.
printStackTrace
public void printStackTrace(PrintStream out)
printStackTrace
public void printStackTrace(PrintWriter out)
setNextException
public boolean setNextException(Exception exception)
Add an exception to the end of the chain.
If the end is not a MessagingException, this exception cannot be added
to the end.
exception
- the new end of the Exception chain
- true if the this Exception was added, false otherwise.