public class SaslException extends IOException
| Constructor and Description |
|---|
SaslException()
Constructs a new instance of
SaslException.
|
SaslException(String
Constructs a new instance of
SaslException with a detailed message.
|
SaslException(String
Constructs a new instance of
SaslException with a detailed message and a root exception.
|
| Modifier and Type | Method and Description |
|---|---|
Throwable |
getCause()
Returns the cause of this throwable or
null if the cause is nonexistent or unknown.
|
Throwable |
initCause(Throwable
Initializes the
cause of this throwable to the specified value.
|
String |
toString()
Returns the string representation of this exception.
|
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, setStackTracepublic SaslException()
SaslException. The root exception and the detailed message are null.
public SaslException(Stringdetail)
SaslException with a detailed message. The root exception is null.
detail - A possibly null string containing details of the exception.
Throwable.getMessage()
public SaslException(Stringdetail, Throwable ex)
SaslException with a detailed message and a root exception. For example, a SaslException might result from a problem with the callback handler, which might throw a NoSuchCallbackException if it does not support the requested callback, or throw an IOException if it had problems obtaining data for the callback. The SaslException's root exception would be then be the exception thrown by the callback handler.
detail - A possibly null string containing details of the exception.
ex - A possibly null root exception that caused this exception.
Throwable.getMessage() ,
getCause()
public ThrowablegetCause()
Throwable
null if the cause is nonexistent or unknown. (The cause is the throwable that caused this throwable to get thrown.)
This implementation returns the cause that was supplied via one of the constructors requiring a Throwable, or that was set after creation with the Throwable method. While it is typically unnecessary to override this method, a subclass can override it to return a cause set by some other means. This is appropriate for a "legacy chained throwable" that predates the addition of chained exceptions to Throwable. Note that it is not necessary to override any of the PrintStackTrace methods, all of which invoke the getCause method to determine the cause of a throwable.
public ThrowableinitCause(Throwable cause)
Throwable
This method can be called at most once. It is generally called from within the constructor, or immediately after creating the throwable. If this throwable was created with Throwable or Throwable, this method cannot be called even once.
An example of using this method on a legacy throwable type without other support for setting the cause is:
try {
lowLevelOp();
} catch (LowLevelException le) {
throw (HighLevelException)
new HighLevelException().initCause(le); // Legacy constructor
}
initCause in class
Throwable
cause - the cause (which is saved for later retrieval by the
Throwable.getCause() method). (A
null value is permitted, and indicates that the cause is nonexistent or unknown.)
Throwable instance.
public StringtoString()
toString in class
Throwable
Throwable.getMessage()