FailureResponse


@CarProtocol
public final class FailureResponse


Denotes a failure in the client to a host request.

This is used for the failure response for an androidx.car.app.IOnDoneCallback

Summary

Constants

static final int
static final int
static final int
static final int
static final int
static final int
static final int

Public constructors

Creates an instance of FailureResponse.

Public methods

boolean
int

Returns the type of the originating exception.

@NonNull String

Returns the stack trace of the originating exception.

int

Constants

BUNDLER_EXCEPTION

Added in 1.0.0
public static final int BUNDLER_EXCEPTION = 1

ILLEGAL_STATE_EXCEPTION

Added in 1.0.0
public static final int ILLEGAL_STATE_EXCEPTION = 2

INVALID_PARAMETER_EXCEPTION

Added in 1.0.0
public static final int INVALID_PARAMETER_EXCEPTION = 3

REMOTE_EXCEPTION

Added in 1.0.0
public static final int REMOTE_EXCEPTION = 6

RUNTIME_EXCEPTION

Added in 1.0.0
public static final int RUNTIME_EXCEPTION = 5

SECURITY_EXCEPTION

Added in 1.0.0
public static final int SECURITY_EXCEPTION = 4

UNKNOWN_ERROR

Added in 1.0.0
public static final int UNKNOWN_ERROR = 0

Public constructors

FailureResponse

Added in 1.0.0
public FailureResponse(@NonNull Throwable exception)

Creates an instance of FailureResponse.

Parameters
@NonNull Throwable exception

the originating cause of the failure

Public methods

equals

public boolean equals(@Nullable Object obj)

getErrorType

Added in 1.0.0
public int getErrorType()

Returns the type of the originating exception.

getStackTrace

Added in 1.0.0
public @NonNull String getStackTrace()

Returns the stack trace of the originating exception.

hashCode

public int hashCode()