ApiException

public class ApiException extends Exception

Known direct subclasses
ResolvableApiException

Exception to be returned by a Task when a call to Google Play services has failed with a possible resolution.


Exception to be returned by a Task when a call to Google Play services has failed.

Summary

Protected fields

final Status
@SuppressViolation(value = "hide_members_annotation")
mStatus

This field is deprecated.

use getStatus instead.

Public constructors

Create an ApiException from a Status.

Public methods

@NonNull Status

Returns the status of the operation.

int

Indicates the status of the operation.

@Nullable String

This method is deprecated.

use getMessage for a summary of the cause.

Inherited methods

From java.lang.Throwable
synchronized final void
synchronized Throwable
synchronized Throwable
String
String
StackTraceElement[]
synchronized final Throwable[]
synchronized Throwable
void
void
setStackTrace(StackTraceElement[] p)
String

Protected fields

mStatus

@SuppressViolation(value = "hide_members_annotation")
protected final Status mStatus

Public constructors

ApiException

public ApiException(@NonNull Status status)

Create an ApiException from a Status.

Parameters
@NonNull Status status

the Status instance containing a message and code.

Public methods

getStatus

public @NonNull Status getStatus()

Returns the status of the operation.

getStatusCode

public int getStatusCode()

Indicates the status of the operation.

Returns
int

Status code resulting from the operation. The value is one of the constants in or specific to the API in use.

getStatusMessage

public @Nullable String getStatusMessage()