CreateCredentialException
public class CreateCredentialException
extends Exception
| java.lang.Object | |||
| ↳ | java.lang.Throwable | ||
| ↳ | java.lang.Exception | ||
| ↳ | android.credentials.CreateCredentialException | ||
Represents an error encountered during the CredentialManager.createCredential(Context, CreateCredentialRequest, 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_CREATE_OPTIONS The error type value for when no create options are available from any provider(s), 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 | |
|---|---|
CreateCredentialException(String type) Constructs a | |
CreateCredentialException(String type, String message) Constructs a | |
CreateCredentialException(String type, String message, Throwable cause) Constructs a | |
CreateCredentialException(String type, Throwable cause) 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.CreateCredentialException.TYPE_INTERRUPTED"
TYPE_NO_CREATE_OPTIONS
public static final String TYPE_NO_CREATE_OPTIONS
The error type value for when no create options are available from any provider(s), for the given CredentialManager.createCredential(Context, CreateCredentialRequest, CancellationSignal, Executor, OutcomeReceiver) request.
Constant Value: "android.credentials.CreateCredentialException.TYPE_NO_CREATE_OPTIONS"
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.CreateCredentialException.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.CreateCredentialException.TYPE_USER_CANCELED"
Public constructors
CreateCredentialException
public CreateCredentialException (String type)
Constructs a CreateCredentialException.
| Parameters | |
|---|---|
type | String: This value cannot be null. |
| Throws | |
|---|---|
IllegalArgumentException | If type is empty. |
CreateCredentialException
public CreateCredentialException (String type, String message)
Constructs a CreateCredentialException.
| Parameters | |
|---|---|
type | String: This value cannot be null. |
message | String: This value may be null. |
| Throws | |
|---|---|
IllegalArgumentException | If type is empty. |
CreateCredentialException
public CreateCredentialException (String type, String message, Throwable cause)
Constructs a CreateCredentialException.
| 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. |
CreateCredentialException
public CreateCredentialException (String type, Throwable cause)
Constructs a CreateCredentialException.
| Parameters | |
|---|---|
type | String: This value cannot be null. |
cause | Throwable: This value may 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. |