FirebaseMLException

public class FirebaseMLException extends FirebaseException

A class of exceptions thrown by Firebase Machine Learning

Nested Class Summary

@interface FirebaseMLException.Code The set of Firebase ML status codes. 

Constant Summary

int ABORTED The operation was aborted, typically due to a concurrency issue like transaction aborts, etc.
int ALREADY_EXISTS Some resource that we attempted to create already exists.
int CANCELLED The operation was cancelled (typically by the caller).
int DATA_LOSS Unrecoverable data loss or corruption.
int DEADLINE_EXCEEDED Deadline expired before operation could complete.
int FAILED_PRECONDITION Operation was rejected because the system is not in a state required for the operation's execution.
int INTERNAL Internal errors.
int INVALID_ARGUMENT Client specified an invalid argument.
int MODEL_HASH_MISMATCH The downloaded model's hash doesn't match the expected value.
int MODEL_INCOMPATIBLE_WITH_TFLITE The downloaded model isn't compatible with the TFLite runtime.
int NOT_ENOUGH_SPACE There is not enough space left on the device.
int NOT_FOUND Some requested resource was not found.
int OK The operation completed successfully.
int OUT_OF_RANGE Operation was attempted past the valid range.
int PERMISSION_DENIED The caller does not have permission to execute the specified operation.
int RESOURCE_EXHAUSTED Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space.
int UNAUTHENTICATED The request does not have valid authentication credentials for the operation.
int UNAVAILABLE The service is currently unavailable.
int UNIMPLEMENTED Operation is not implemented or not supported/enabled.
int UNKNOWN Unknown error or an error from a different error domain.

Public Method Summary

int
getCode()
Gets the error code for the Firebase ML operation that failed.

Inherited Method Summary

Constants

public static final int ABORTED

The operation was aborted, typically due to a concurrency issue like transaction aborts, etc.

Constant Value: 10

public static final int ALREADY_EXISTS

Some resource that we attempted to create already exists.

Constant Value: 6

public static final int CANCELLED

The operation was cancelled (typically by the caller).

Constant Value: 1

public static final int DATA_LOSS

Unrecoverable data loss or corruption.

Constant Value: 15

public static final int DEADLINE_EXCEEDED

Deadline expired before operation could complete. For operations that change the state of the system, this error may be returned even if the operation has completed successfully. For example, a successful response from a server could have been delayed long enough for the deadline to expire.

Constant Value: 4

public static final int FAILED_PRECONDITION

Operation was rejected because the system is not in a state required for the operation's execution.

Constant Value: 9

public static final int INTERNAL

Internal errors. Means some invariants expected by underlying system has been broken. If you see one of these errors, something is very broken.

Constant Value: 13

public static final int INVALID_ARGUMENT

Client specified an invalid argument. Note that this differs from FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments that are problematic regardless of the state of the system (e.g., an invalid field name).

Constant Value: 3

public static final int MODEL_HASH_MISMATCH

The downloaded model's hash doesn't match the expected value.

Constant Value: 102

public static final int MODEL_INCOMPATIBLE_WITH_TFLITE

The downloaded model isn't compatible with the TFLite runtime.

Constant Value: 100

public static final int NOT_ENOUGH_SPACE

There is not enough space left on the device.

Constant Value: 101

public static final int NOT_FOUND

Some requested resource was not found.

Constant Value: 5

public static final int OK

The operation completed successfully. FirebaseMLException will never have a status of OK.

Constant Value: 0

public static final int OUT_OF_RANGE

Operation was attempted past the valid range.

Constant Value: 11

public static final int PERMISSION_DENIED

The caller does not have permission to execute the specified operation.

Constant Value: 7

public static final int RESOURCE_EXHAUSTED

Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space.

Constant Value: 8

public static final int UNAUTHENTICATED

The request does not have valid authentication credentials for the operation.

Constant Value: 16

public static final int UNAVAILABLE

The service is currently unavailable. This is a most likely a transient condition and may be corrected by retrying with a backoff.

In ML Kit, this error is mostly about the models being not available yet.

Constant Value: 14

public static final int UNIMPLEMENTED

Operation is not implemented or not supported/enabled.

Constant Value: 12

public static final int UNKNOWN

Unknown error or an error from a different error domain.

Constant Value: 2

Public Methods

public int getCode ()

Gets the error code for the Firebase ML operation that failed.