Android 12 Developer Preview is here! Try it out, and give us your feedback!

FailureResponse

public final class FailureResponse
extends Object

java.lang.Object
   ↳ androidx.car.app.FailureResponse


Denotes a failure in the client to a host request.

This is used for the failure response for an IOnDoneCallback

Summary

Constants

int BUNDLER_EXCEPTION

int ILLEGAL_STATE_EXCEPTION

int INVALID_PARAMETER_EXCEPTION

int REMOTE_EXCEPTION

int RUNTIME_EXCEPTION

int SECURITY_EXCEPTION

int UNKNOWN_ERROR

Public constructors

FailureResponse(Throwable exception)

Creates an instance of FailureResponse.

Public methods

boolean equals(Object obj)
int getErrorType()

Returns the type of the originating exception.

String getStackTrace()

Returns the stack trace of the originating exception.

int hashCode()

Inherited methods

Constants

BUNDLER_EXCEPTION

public static final int BUNDLER_EXCEPTION

Constant Value: 1 (0x00000001)

ILLEGAL_STATE_EXCEPTION

public static final int ILLEGAL_STATE_EXCEPTION

Constant Value: 2 (0x00000002)

INVALID_PARAMETER_EXCEPTION

public static final int INVALID_PARAMETER_EXCEPTION

Constant Value: 3 (0x00000003)

REMOTE_EXCEPTION

public static final int REMOTE_EXCEPTION

Constant Value: 6 (0x00000006)

RUNTIME_EXCEPTION

public static final int RUNTIME_EXCEPTION

Constant Value: 5 (0x00000005)

SECURITY_EXCEPTION

public static final int SECURITY_EXCEPTION

Constant Value: 4 (0x00000004)

UNKNOWN_ERROR

public static final int UNKNOWN_ERROR

Constant Value: 0 (0x00000000)

Public constructors

FailureResponse

public FailureResponse (Throwable exception)

Creates an instance of FailureResponse.

Parameters
exception Throwable: the originating cause of the failure

Public methods

equals

public boolean equals (Object obj)

Parameters
obj Object

Returns
boolean

getErrorType

public int getErrorType ()

Returns the type of the originating exception.

Returns
int

getStackTrace

public String getStackTrace ()

Returns the stack trace of the originating exception.

Returns
String

hashCode

public int hashCode ()

Returns
int