Package javax.mail
Class MessagingException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- javax.mail.MessagingException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
AuthenticationFailedException
,FolderClosedException
,FolderNotFoundException
,IllegalWriteException
,MessageRemovedException
,MethodNotSupportedException
,NoSuchProviderException
,ParseException
,ReadOnlyFolderException
,SearchException
,SendFailedException
,StoreClosedException
public class MessagingException extends java.lang.Exception
A general messaging exception.- Version:
- 1.4
- Author:
- Chris Burdess
- See Also:
- Serialized Form
-
-
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.
-
-
-
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 messageexception
- 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 classjava.lang.Throwable
-
printStackTrace
public void printStackTrace(java.io.PrintStream out)
- Overrides:
printStackTrace
in classjava.lang.Throwable
-
printStackTrace
public void printStackTrace(java.io.PrintWriter out)
- Overrides:
printStackTrace
in classjava.lang.Throwable
-
-