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()
返回此错误或
null 原因如果原因是不存在的或未知的。
|
Throwable |
initCause(Throwable cause)
这个异常原因初始化为指定值。
|
String |
toString()
返回此异常的字符串表示形式。
|
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, setStackTrace
public SaslException()
SaslException
。根异常和详细消息是空的。
public SaslException(String detail)
SaslException
新实例的详细信息。根异常是空的。
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.initCause(Throwable)
方法创建后。虽然它通常不需要重写此方法,但子类可以重写它以通过其他方式返回一个原因集。这是适合“遗产锁抛出“在连锁Throwable
添加例外。请注意,它凌驾于任何的PrintStackTrace
方法是不必要,所有这些调用getCause
方法来确定一个Throwable的原因。
public Throwable initCause(Throwable cause)
Throwable
这种方法可以被称为在最一次。它通常被称为在构造函数或后立即创建错误。如果这个异常是Throwable.Throwable(Throwable)
或Throwable.Throwable(String,Throwable)
创建,该方法不能被叫做曾经。
使用这种方法的一个遗留Throwable类型不定导致其他支持的一个例子是:
尝试{lowlevelop();} catch(lowlevelexception LE){把(highlevelexception)新的highlevelexception()。initcause(LE);/ /遗留的构造函数})
initCause
方法重写,继承类
Throwable
cause
的原因(这是以后的
Throwable.getCause()
方法检索)。(一
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.