### *** This class provides Binary Compatibility only, not Source Compatibility ***

Package com.sas.services.connection

# Class CredentialsException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.sas.services.connection.ConnectionFactoryException
com.sas.services.connection.LoginException
com.sas.services.connection.CredentialsException

All Implemented Interfaces:
  `com.sas.util.ChainedExceptionInterface`, `Serializable`

Direct Known Subclasses:
  `WrongCredentialsException`

@SASScope("ALL") @BinaryCompatibilityOnly public abstract class CredentialsException extends LoginException
Base class for exceptions thrown to indicate that something is wrong with credentials presented during a connection request.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `CredentialsException()`
  `protected`
  `CredentialsException(String msg)`
  `protected`
  `CredentialsException(String msg, Throwable nestedException)`
  `protected`
  `CredentialsException(String msg, Throwable nestedException, Credential badCredential)`
  `protected`
  `CredentialsException(Throwable nestedException)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getDomain()`
  Get the domain of the bad credential.
  `String`
  `getUserName()`
  Get the user name of the bad credential.
  `boolean`
  `isPasswordCredential()`
  `true` if the bad credential is an instance of `com.sas.services.connection.PasswordCredential`.

  ### Methods inherited from class com.sas.services.connection.LoginException

  `isLoginCallbackError, setLoginCallbackError`

  ### Methods inherited from class com.sas.services.connection.ConnectionFactoryException

  `getRootException, getTargetException`

  ### Methods inherited from class java.lang.Throwable

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### CredentialsException

    protected CredentialsException()

  - ### CredentialsException

    protected CredentialsException(String msg)

  - ### CredentialsException

    protected CredentialsException(Throwable nestedException)

  - ### CredentialsException

    protected CredentialsException(String msg, Throwable nestedException)

  - ### CredentialsException

    protected CredentialsException(String msg, Throwable nestedException, Credential badCredential)

- ## Method Details

  - ### isPasswordCredential

    public boolean isPasswordCredential()
    `true` if the bad credential is an instance of `com.sas.services.connection.PasswordCredential`.
    Returns:
      `true` if the bad credential is an instance of `com.sas.services.connection.PasswordCredential`.
    See Also:
      - `getUserName()`

  - ### getUserName

    public String getUserName()
    Get the user name of the bad credential. If the bad credential is not an instance of `com.sas.services.connection.PasswordCredential`, then this method will return `null`.
    Returns:
      the user name of the bad credential
    See Also:
      - `isPasswordCredential()`

  - ### getDomain

    public String getDomain()
    Get the domain of the bad credential.
    Returns:
      the domain of the bad credential.