javax.mail
Class MessagingException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by javax.mail.MessagingException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AuthenticationFailedException, FolderClosedException, FolderNotFoundException, IllegalWriteException, MessageRemovedException, MethodNotSupportedException, NoSuchProviderException, ParseException, ReadOnlyFolderException, SearchException, SendFailedException, StoreClosedException

public class MessagingException
extends Exception

A general messaging exception.

Version:
1.4
Author:
Chris Burdess
See Also:
Serialized Form

Constructor Summary
MessagingException()
          Constructs a messaging exception with no detail message.
MessagingException(String message)
          Constructs a messaging exception with the specified detail message.
MessagingException(String message, Exception exception)
          Constructs a messaging exception with the specified exception and detail message.
 
Method Summary
 String getMessage()
          Returns the message, including the message from any nested exception.
 Exception getNextException()
          Returns the next exception chained to this one.
 void printStackTrace(PrintStream out)
           
 void printStackTrace(PrintWriter out)
           
 boolean setNextException(Exception exception)
          Adds an exception to the end of the chain.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, 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(String message)
Constructs a messaging exception with the specified detail message.

Parameters:
message - the detail message

MessagingException

public MessagingException(String message,
                          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 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(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 String getMessage()
Returns the message, including the message from any nested exception.

Overrides:
getMessage in class Throwable

printStackTrace

public void printStackTrace(PrintStream out)
Overrides:
printStackTrace in class Throwable

printStackTrace

public void printStackTrace(PrintWriter out)
Overrides:
printStackTrace in class Throwable


© Copyright 2003, 2004 The Free Software Foundation, All rights reserved