|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.mail Class MessagingException
java.lang.Object java.lang.Throwable java.lang.Exception 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
Extends:
Throwable > Exception
Extended by:
AuthenticationFailedException, FolderClosedException, FolderNotFoundException, IllegalWriteException, MessageRemovedException, MethodNotSupportedException, NoSuchProviderException, ParseException, ReadOnlyFolderException, SearchException, SendFailedException, StoreClosedException
Messaging 类抛出的所有异常的基类。
The base class for all exceptions thrown by the Messaging classes
- Author:
- John Mani, Bill Shannon
- See Also:
- Serialized Form
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public
MessagingException()
构造不带详细消息的 MessagingException。
英文文档:
MessagingException
public MessagingException()
- Constructs a MessagingException with no detail message.
public
MessagingException(String s)
构造带指定详细消息的 MessagingException。
s | 详细信息 |
MessagingException
public MessagingException(String s)
- Constructs a MessagingException with the specified detail message.
- Parameters:
s
- the detail message
public
MessagingException(String s, Exception e)
构造带指定 Exception 和详细消息的 MessagingException。指定的异常链接到此异常。
s | 详细信息 |
e | 嵌入的异常 |
See also | getNextException, setNextException, getCause |
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.
- Parameters:
s
- the detail messagee
- the embedded exception- See Also:
getNextException()
,setNextException(java.lang.Exception)
,getCause()
Method Detail |
---|
public Exception
getNextException()
获取链接此异常链的下一个异常。如果下一个异常是 MessagingException,则该链可以进一步扩展。
return | 下一个 Exception;如果不存在,则返回 null。 |
getNextException
public Exception getNextException()
- Get the next exception chained to this one. If the
next exception is a MessagingException, the chain
may extend further.
- Returns:
- next Exception, null if none.
public Throwable
getCause()
重写 Throwable
的 getCause
方法,以返回嵌套异常链中的下一个异常。
return | 下一个 Exception;如果不存在,则返回 null。 |
getCause
public Throwable getCause()
- Overrides the
getCause
method ofThrowable
to return the next exception in the chain of nested exceptions. - Returns:
- next Exception, null if none.
public boolean
setNextException(Exception ex)
将异常添加到链的末尾。如果末尾的异常不是 MessagingException,则无法将此异常添加到末尾。
ex | Exception 链的新末尾 |
return |
如果添加了此 Exception,则返回 true ;否则返回 false 。 |
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.
- Parameters:
ex
- the new end of the Exception chain- Returns:
true
if this Exception was added,false
otherwise.
public String
toString()
重写 toString 方法,以提供关于嵌套异常的信息。
英文文档:
toString
public String toString()
- Override toString method to provide information on
nested exceptions.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!