Error
Stay organized with collections
Save and categorize content based on your preferences.
This class is deprecated.
Please use Fido
APIs instead.
Represents a U2F Error object.
Public Constructor Summary
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String
|
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
Constants
public static final String
JSON_ERROR_CODE
Constant Value: "errorCode"
public static final String
JSON_ERROR_MESSAGE
Constant Value:
"errorMessage"
Public Methods
public String getErrorMessage ()
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[null,null,["Last updated 2024-10-31 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eError\u003c/code\u003e class is deprecated and developers should use Fido APIs instead.\u003c/p\u003e\n"],["\u003cp\u003eIt represents a U2F Error object and provides methods to access error code and message.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eError\u003c/code\u003e objects can be converted to JSON objects for easier handling.\u003c/p\u003e\n"],["\u003cp\u003eTwo public constructors are available to create \u003ccode\u003eError\u003c/code\u003e instances with an error code and optional error message.\u003c/p\u003e\n"]]],["The `Error` class is deprecated and should be replaced with Fido APIs. It represents a U2F Error, providing methods to manage error details. Key actions involve constructing `Error` objects with an `ErrorCode`, optionally including an error message. The class provides methods to retrieve the error code and message (`getErrorCode`, `getErrorMessage`) and to convert the error to a JSON object (`toJsonObject`). Constants `JSON_ERROR_CODE` and `JSON_ERROR_MESSAGE` are defined for JSON representation.\n"],null,["# Error\n\npublic class **Error** extends [Object](//developer.android.com/reference/java/lang/Object.html) \n**This class is deprecated.** \n\nPlease use [Fido](/android/reference/com/google/android/gms/fido/Fido) APIs instead.\n\nRepresents a U2F Error object. \n\n### Constant Summary\n\n|-------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|---|\n| [String](//developer.android.com/reference/java/lang/String.html) | [JSON_ERROR_CODE](/android/reference/com/google/android/gms/fido/u2f/api/common/Error#JSON_ERROR_CODE) | |\n| [String](//developer.android.com/reference/java/lang/String.html) | [JSON_ERROR_MESSAGE](/android/reference/com/google/android/gms/fido/u2f/api/common/Error#JSON_ERROR_MESSAGE) | |\n\n### Public Constructor Summary\n\n|---|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | [Error](/android/reference/com/google/android/gms/fido/u2f/api/common/Error#Error(com.google.android.gms.fido.u2f.api.common.ErrorCode))([ErrorCode](/android/reference/com/google/android/gms/fido/u2f/api/common/ErrorCode) errorCode) |\n| | [Error](/android/reference/com/google/android/gms/fido/u2f/api/common/Error#Error(com.google.android.gms.fido.u2f.api.common.ErrorCode,%20java.lang.String))([ErrorCode](/android/reference/com/google/android/gms/fido/u2f/api/common/ErrorCode) errorCode, [String](//developer.android.com/reference/java/lang/String.html) errorMessage) |\n\n### Public Method Summary\n\n|--------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------|\n| [ErrorCode](/android/reference/com/google/android/gms/fido/u2f/api/common/ErrorCode) | [getErrorCode](/android/reference/com/google/android/gms/fido/u2f/api/common/Error#getErrorCode())() |\n| [String](//developer.android.com/reference/java/lang/String.html) | [getErrorMessage](/android/reference/com/google/android/gms/fido/u2f/api/common/Error#getErrorMessage())() |\n| [JSONObject](//developer.android.com/reference/org/json/JSONObject.html) | [toJsonObject](/android/reference/com/google/android/gms/fido/u2f/api/common/Error#toJsonObject())() |\n| [String](//developer.android.com/reference/java/lang/String.html) | [toString](/android/reference/com/google/android/gms/fido/u2f/api/common/Error#toString())() |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nConstants\n---------\n\n#### public static final [String](//developer.android.com/reference/java/lang/String.html)\n**JSON_ERROR_CODE**\n\nConstant Value: \"errorCode\" \n\n#### public static final [String](//developer.android.com/reference/java/lang/String.html)\n**JSON_ERROR_MESSAGE**\n\nConstant Value: \"errorMessage\"\n\nPublic Constructors\n-------------------\n\n#### public **Error** ([ErrorCode](/android/reference/com/google/android/gms/fido/u2f/api/common/ErrorCode) errorCode)\n\n#### public **Error** ([ErrorCode](/android/reference/com/google/android/gms/fido/u2f/api/common/ErrorCode) errorCode, [String](//developer.android.com/reference/java/lang/String.html) errorMessage)\n\nPublic Methods\n--------------\n\n#### public [ErrorCode](/android/reference/com/google/android/gms/fido/u2f/api/common/ErrorCode)\n**getErrorCode** ()\n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **getErrorMessage** ()\n\n#### public [JSONObject](//developer.android.com/reference/org/json/JSONObject.html)\n**toJsonObject** ()\n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **toString** ()"]]