SaslException (Java SE 11 & JDK 11 ) (original) (raw)
- java.lang.Throwable
- java.lang.Exception
- java.io.IOException
* * javax.security.sasl.SaslException
- java.io.IOException
- java.lang.Exception
All Implemented Interfaces:
[Serializable](../../../../java.base/java/io/Serializable.html "interface in java.io")
Direct Known Subclasses:[AuthenticationException](AuthenticationException.html "class in javax.security.sasl")
public class SaslException
extends IOException
This class represents an error that has occurred when using SASL.
Since:
1.5
See Also:
Serialized Form
Constructor Summary
Constructors
Constructor Description SaslException() Constructs a new instance of SaslException. SaslException(String detail) Constructs a new instance of SaslException with a detailed message. SaslException(String detail,Throwable ex) Constructs a new instance of SaslException with a detailed message and a root exception. Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type Method Description String toString() Returns the string representation of this exception. * ### Methods declared in class java.lang.[Throwable](../../../../java.base/java/lang/Throwable.html "class in java.lang") `[addSuppressed](../../../../java.base/java/lang/Throwable.html#addSuppressed%28java.lang.Throwable%29), [fillInStackTrace](../../../../java.base/java/lang/Throwable.html#fillInStackTrace%28%29), [getCause](../../../../java.base/java/lang/Throwable.html#getCause%28%29), [getLocalizedMessage](../../../../java.base/java/lang/Throwable.html#getLocalizedMessage%28%29), [getMessage](../../../../java.base/java/lang/Throwable.html#getMessage%28%29), [getStackTrace](../../../../java.base/java/lang/Throwable.html#getStackTrace%28%29), [getSuppressed](../../../../java.base/java/lang/Throwable.html#getSuppressed%28%29), [initCause](../../../../java.base/java/lang/Throwable.html#initCause%28java.lang.Throwable%29), [printStackTrace](../../../../java.base/java/lang/Throwable.html#printStackTrace%28%29), [printStackTrace](../../../../java.base/java/lang/Throwable.html#printStackTrace%28java.io.PrintStream%29), [printStackTrace](../../../../java.base/java/lang/Throwable.html#printStackTrace%28java.io.PrintWriter%29), [setStackTrace](../../../../java.base/java/lang/Throwable.html#setStackTrace%28java.lang.StackTraceElement%5B%5D%29)` * ### Methods declared in class java.lang.[Object](../../../../java.base/java/lang/Object.html "class in java.lang") `[clone](../../../../java.base/java/lang/Object.html#clone%28%29), [equals](../../../../java.base/java/lang/Object.html#equals%28java.lang.Object%29), [finalize](../../../../java.base/java/lang/Object.html#finalize%28%29), [getClass](../../../../java.base/java/lang/Object.html#getClass%28%29), [hashCode](../../../../java.base/java/lang/Object.html#hashCode%28%29), [notify](../../../../java.base/java/lang/Object.html#notify%28%29), [notifyAll](../../../../java.base/java/lang/Object.html#notifyAll%28%29), [wait](../../../../java.base/java/lang/Object.html#wait%28%29), [wait](../../../../java.base/java/lang/Object.html#wait%28long%29), [wait](../../../../java.base/java/lang/Object.html#wait%28long,int%29)`
Constructor Detail
* #### SaslException public SaslException() Constructs a new instance of `SaslException`. The root exception and the detailed message are null. * #### SaslException public SaslException([String](../../../../java.base/java/lang/String.html "class in java.lang") detail) Constructs a new instance of `SaslException` with a detailed message. The root exception is null. Parameters: `detail` \- A possibly null string containing details of the exception. See Also: [Throwable.getMessage()](../../../../java.base/java/lang/Throwable.html#getMessage%28%29) * #### SaslException public SaslException([String](../../../../java.base/java/lang/String.html "class in java.lang") detail, [Throwable](../../../../java.base/java/lang/Throwable.html "class in java.lang") ex) Constructs a new instance of `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. Parameters: `detail` \- A possibly null string containing details of the exception. `ex` \- A possibly null root exception that caused this exception. See Also: [Throwable.getMessage()](../../../../java.base/java/lang/Throwable.html#getMessage%28%29), [Throwable.getCause()](../../../../java.base/java/lang/Throwable.html#getCause%28%29)
Method Detail
* #### toString public [String](../../../../java.base/java/lang/String.html "class in java.lang") toString() Returns the string representation of this exception. The string representation contains this exception's class name, its detailed message, and if it has a root exception, the string representation of the root exception. This string representation is meant for debugging and not meant to be interpreted programmatically. Overrides: `[toString](../../../../java.base/java/lang/Throwable.html#toString%28%29)` in class `[Throwable](../../../../java.base/java/lang/Throwable.html "class in java.lang")` Returns: The non-null string representation of this exception. See Also: [Throwable.getMessage()](../../../../java.base/java/lang/Throwable.html#getMessage%28%29)
Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2025, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.