javax.mail
类 MessagingException

java.lang.Object
  继承者 java.lang.Throwable
      继承者 java.lang.Exception
          继承者 javax.mail.MessagingException
所有已实现的接口:
Serializable
直接已知子类:
AuthenticationFailedException, FolderClosedException, FolderNotFoundException, IllegalWriteException, MessageRemovedException, MethodNotSupportedException, NoSuchProviderException, ParseException, ReadOnlyFolderException, SearchException, SendFailedException, SMTPAddressSucceededException, StoreClosedException

public class MessagingException
extends Exception

The base class for all exceptions thrown by the Messaging classes

作者:
John Mani, Bill Shannon
另请参见:
序列化表格

构造方法摘要
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.
 
方法摘要
 Throwable getCause()
          Overrides the getCause method of Throwable to return the next exception in the chain of nested exceptions.
 Exception getNextException()
          Get the next exception chained to this one.
 boolean setNextException(Exception ex)
          Add an exception to the end of the chain.
 String toString()
          Override toString method to provide information on nested exceptions.
 
从类 java.lang.Throwable 继承的方法
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

MessagingException

public MessagingException()
Constructs a MessagingException with no detail message.


MessagingException

public MessagingException(String s)
Constructs a MessagingException with the specified detail message.

参数:
s - the detail message

MessagingException

public MessagingException(String s,
                          Exception e)
Constructs a MessagingException with the specified Exception and detail message. The specified exception is chained to this exception.

参数:
s - the detail message
e - the embedded exception
另请参见:
getNextException(), setNextException(java.lang.Exception), getCause()
方法详细信息

getNextException

public Exception getNextException()
Get the next exception chained to this one. If the next exception is a MessagingException, the chain may extend further.

返回:
next Exception, null if none.

getCause

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

覆盖:
Throwable 中的 getCause
返回:
next Exception, null if none.

setNextException

public 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.

参数:
ex - the new end of the Exception chain
返回:
true if this Exception was added, false otherwise.

toString

public String toString()
Override toString method to provide information on nested exceptions.

覆盖:
Throwable 中的 toString


Copyright © 2013. All Rights Reserved.