GetCredentialException
public
class
GetCredentialException
extends Exception
java.lang.Object | |||
↳ | java.lang.Throwable | ||
↳ | java.lang.Exception | ||
↳ | android.credentials.GetCredentialException |
Represents an error encountered during the
CredentialManager#getCredential(Context, GetCredentialRequest,
CancellationSignal, Executor, OutcomeReceiver)
operation.
Summary
Constants | |
---|---|
String |
TYPE_INTERRUPTED
The error type value for when the given operation failed due to internal interruption. |
String |
TYPE_NO_CREDENTIAL
The error type value for when no credential is found available for the given |
String |
TYPE_UNKNOWN
The error type value for when the given operation failed due to an unknown reason. |
String |
TYPE_USER_CANCELED
The error type value for when the user intentionally cancelled the request. |
Public constructors | |
---|---|
GetCredentialException(String type, String message)
Constructs a |
|
GetCredentialException(String type, String message, Throwable cause)
Constructs a |
|
GetCredentialException(String type, Throwable cause)
Constructs a |
|
GetCredentialException(String type)
Constructs a |
Public methods | |
---|---|
String
|
getType()
Returns the specific exception type. |
Inherited methods | |
---|---|
Constants
TYPE_INTERRUPTED
public static final String TYPE_INTERRUPTED
The error type value for when the given operation failed due to internal interruption. Retrying the same operation should fix the error.
Constant Value: "android.credentials.GetCredentialException.TYPE_INTERRUPTED"
TYPE_NO_CREDENTIAL
public static final String TYPE_NO_CREDENTIAL
The error type value for when no credential is found available for the given CredentialManager.getCredential(android.content.Context, android.credentials.GetCredentialRequest, android.os.CancellationSignal, java.util.concurrent.Executor, android.os.OutcomeReceiver)
request.
Constant Value: "android.credentials.GetCredentialException.TYPE_NO_CREDENTIAL"
TYPE_UNKNOWN
public static final String TYPE_UNKNOWN
The error type value for when the given operation failed due to an unknown reason.
Constant Value: "android.credentials.GetCredentialException.TYPE_UNKNOWN"
TYPE_USER_CANCELED
public static final String TYPE_USER_CANCELED
The error type value for when the user intentionally cancelled the request.
This is a strong indicator that your app should refrain from making the same api call for a certain amount of time to provide a better user experience.
Constant Value: "android.credentials.GetCredentialException.TYPE_USER_CANCELED"
Public constructors
GetCredentialException
public GetCredentialException (String type, String message)
Constructs a GetCredentialException
.
Parameters | |
---|---|
type |
String : This value cannot be null . |
message |
String : This value may be null . |
Throws | |
---|---|
IllegalArgumentException |
If type is empty. |
GetCredentialException
public GetCredentialException (String type, String message, Throwable cause)
Constructs a GetCredentialException
.
Parameters | |
---|---|
type |
String : This value cannot be null . |
message |
String : This value may be null . |
cause |
Throwable : This value may be null . |
Throws | |
---|---|
IllegalArgumentException |
If type is empty. |
GetCredentialException
public GetCredentialException (String type, Throwable cause)
Constructs a GetCredentialException
.
Parameters | |
---|---|
type |
String : This value cannot be null . |
cause |
Throwable : This value may be null . |
Throws | |
---|---|
IllegalArgumentException |
If type is empty. |
GetCredentialException
public GetCredentialException (String type)
Constructs a GetCredentialException
.
Parameters | |
---|---|
type |
String : This value cannot be null . |
Throws | |
---|---|
IllegalArgumentException |
If type is empty. |
Public methods
getType
public String getType ()
Returns the specific exception type.
Returns | |
---|---|
String |
This value cannot be null . |