Top Description Fields Constructors Methods
javax.mail

public Class MessagingException

extends Exception
Class Inheritance
Known Direct Subclasses
javax.mail.MethodNotSupportedException, javax.mail.NoSuchProviderException, javax.mail.ReadOnlyFolderException, javax.mail.SendFailedException, javax.mail.StoreClosedException, javax.mail.internet.ParseException, javax.mail.search.SearchException, com.sun.mail.smtp.SMTPAddressSucceededException, com.sun.mail.util.MailConnectException, javax.mail.AuthenticationFailedException, javax.mail.FolderClosedException, javax.mail.FolderNotFoundException, javax.mail.IllegalWriteException, javax.mail.MessageRemovedException
Imports
java.lang.*

The base class for all exceptions thrown by the Messaging classes
Authors
John Mani, Bill Shannon

Field Summary

Modifier and TypeField and Description
private Exception
next

The next exception in the chain.

private static final long

Constructor Summary

AccessConstructor and Description
public
MessagingException()

Constructs a MessagingException with no detail message.

public
MessagingException(String
the detail message
s
)

Constructs a MessagingException with the specified detail message.

public
MessagingException(String
the detail message
s
,
Exception
the embedded exception
e
)

Constructs a MessagingException with the specified Exception and detail message.

Method Summary

Modifier and TypeMethod and Description
public synchronized Throwable

Returns:

next Exception, null if none.
getCause
()

Overrides java.lang.Throwable.getCause.

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

Returns:

next Exception, null if none.
getNextException
()

Get the next exception chained to this one.

public synchronized boolean

Returns:

true if this Exception was added, false otherwise.
setNextException
(Exception
the new end of the Exception chain
ex
)

Add an exception to the end of the chain.

private final String
superToString()

Return the "toString" information for this exception, without any information on nested exceptions.

public synchronized String
toString()

Overrides java.lang.Throwable.toString.

Override toString method to provide information on nested exceptions.

Field Detail

nextback to summary
private Exception next

The next exception in the chain.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.Exception.serialVersionUID.

Constructor Detail

MessagingExceptionback to summary
public MessagingException()

Constructs a MessagingException with no detail message.

MessagingExceptionback to summary
public MessagingException(String s)

Constructs a MessagingException with the specified detail message.

Parameters
s:String

the detail message

MessagingExceptionback to summary
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:String

the detail message

e:Exception

the embedded exception

See Also
getNextException, setNextException, getCause

Method Detail

getCauseback to summary
public synchronized Throwable getCause()

Overrides java.lang.Throwable.getCause.

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

Returns:Throwable

next Exception, null if none.

Annotations
@Override
getNextExceptionback to summary
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:Exception

next Exception, null if none.

setNextExceptionback to summary
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:Exception

the new end of the Exception chain

Returns:boolean

true if this Exception was added, false otherwise.

superToStringback to summary
private final String superToString()

Return the "toString" information for this exception, without any information on nested exceptions.

toStringback to summary
public synchronized String toString()

Overrides java.lang.Throwable.toString.

Override toString method to provide information on nested exceptions.

Returns:String

Doc from java.lang.Throwable.toString.

a string representation of this throwable.

Annotations
@Override