MessagingException (Java EE 5 SDK)

Java

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


javax.mail Class MessagingException

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

public class MessagingException
extends Exception

The base class for all exceptions thrown by the Messaging classes

作者:
John Mani, Bill Shannon
另请参见:
Serialized Form

构造器摘要
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.

重写:
getCause in class Throwable
返回:
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.

重写:
toString in class Throwable

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


提交错误或意见

版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。深圳电信培训中心.徐海蛟老师教学参考.