public class SaslException extends IOException
| Constructor and Description |
|---|
SaslException()
构造一个新的实例
SaslException 。
|
SaslException(String detail)
构造一个新的实例
SaslException与详细的消息。
|
SaslException(String detail, Throwable ex)
构造的新实例
SaslException带详细消息和根异常。
|
| Modifier and Type | Method and Description |
|---|---|
Throwable |
getCause()
如果原因不存在或未知,则返回此throwable的原因或
null 。
|
Throwable |
initCause(Throwable cause)
将此throwable的
原因初始化为指定值。
|
String |
toString()
返回此异常的字符串表示形式。
|
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, setStackTracepublic SaslException()
SaslException 。
根异常和详细消息为null。
public SaslException(String detail)
SaslException与详细的消息。
根异常为null。
detail - 包含异常详细信息的可能为空的字符串。
Throwable.getMessage()
public SaslException(String detail, Throwable ex)
SaslException带详细消息和根异常。
例如,SaslException可能是由于回调处理程序的问题引起的,如果它不支持请求的回调,则可能会抛出NoSuchCallbackException,如果在获取回调数据时遇到问题,则抛出IOException。
SaslException的根异常将是回调处理程序抛出的异常。
detail - 包含异常详细信息的可能为空的字符串。
ex - 导致此异常的可能的空根异常。
Throwable.getMessage() ,
getCause()
public Throwable getCause()
Throwable复制
null 。
(原因是引发这个可抛掷物的抛掷物)
此实现返回通过需要Throwable的Throwable函数之一提供的Throwable ,或者使用Throwable.initCause(Throwable)方法创建后设置的原因 。 虽然通常不必重写此方法,但是子类可以覆盖它以返回通过其他方法设置的原因。 这适用于“传统链接可抛出”,它将链接异常添加到Throwable 。 请注意, 没有必要覆盖任何PrintStackTrace方法,所有这些方法都调用getCause方法来确定可抛出的原因。
public Throwable initCause(Throwable cause)
Throwable复制
这个方法最多可以调用一次。 它通常从构造函数中调用,或者在创建throwable之后立即调用。 如果这个throwable是使用Throwable.Throwable(Throwable)或Throwable.Throwable(String,Throwable)创建的,则该方法不能被调用一次。
在没有其他支持设置原因的情况下,以传统可抛弃类型使用此方法的示例是:
try {
lowLevelOp();
} catch (LowLevelException le) {
throw (HighLevelException)
new HighLevelException().initCause(le); // Legacy constructor
}
initCause在类别
Throwable
cause - 原因(由Throwable.getCause()方法保存供以后检索)。
( null A null值,并表示原因不存在或未知。)
Throwable实例。
public String toString()
toString在
Throwable
Throwable.getMessage()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.