FirebaseMlException

public class FirebaseMlException extends FirebaseException


Represents an Exception resulting from an operation on a FirebaseModelDownloader. Error mappings should remain consistent with the original firebase_ml_sdk whenever possible.

Summary

Nested types

@IntDef(value = )
@Retention(value = RetentionPolicy.CLASS)
public annotation FirebaseMlException.Code

This annotation is deprecated.

Firebase ML is deprecated and will be shut down on June 15, 2027.

Constants

static final int
ABORTED = 10

This field is deprecated.

Firebase ML is deprecated and will be shut down on June 15, 2027.

static final int

This field is deprecated.

Firebase ML is deprecated and will be shut down on June 15, 2027.

static final int

This field is deprecated.

Firebase ML is deprecated and will be shut down on June 15, 2027.

static final int

This field is deprecated.

Firebase ML is deprecated and will be shut down on June 15, 2027.

static final int

This field is deprecated.

Firebase ML is deprecated and will be shut down on June 15, 2027.

static final int

This field is deprecated.

Firebase ML is deprecated and will be shut down on June 15, 2027.

static final int

This field is deprecated.

Firebase ML is deprecated and will be shut down on June 15, 2027.

static final int

This field is deprecated.

Firebase ML is deprecated and will be shut down on June 15, 2027.

static final int

This field is deprecated.

Firebase ML is deprecated and will be shut down on June 15, 2027.

static final int

This field is deprecated.

Firebase ML is deprecated and will be shut down on June 15, 2027.

static final int

This field is deprecated.

Firebase ML is deprecated and will be shut down on June 15, 2027.

static final int

This field is deprecated.

Firebase ML is deprecated and will be shut down on June 15, 2027.

static final int

This field is deprecated.

Firebase ML is deprecated and will be shut down on June 15, 2027.

static final int

This field is deprecated.

Firebase ML is deprecated and will be shut down on June 15, 2027.

static final int

This field is deprecated.

Firebase ML is deprecated and will be shut down on June 15, 2027.

static final int

This field is deprecated.

Firebase ML is deprecated and will be shut down on June 15, 2027.

static final int

This field is deprecated.

Firebase ML is deprecated and will be shut down on June 15, 2027.

static final int

This field is deprecated.

Firebase ML is deprecated and will be shut down on June 15, 2027.

static final int

This field is deprecated.

Firebase ML is deprecated and will be shut down on June 15, 2027.

Public fields

final int

Public methods

int

This method is deprecated.

Firebase ML is deprecated and will be shut down on June 15, 2027.

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[] stackTrace)
String

Constants

ABORTED

public static final int ABORTED = 10

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

ALREADY_EXISTS

public static final int ALREADY_EXISTS = 6

Some resource that we attempted to create already exists.

CANCELLED

public static final int CANCELLED = 1

The operation was cancelled (typically by the caller).

DEADLINE_EXCEEDED

public static final int DEADLINE_EXCEEDED = 4

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.

DOWNLOAD_URL_EXPIRED

public static final int DOWNLOAD_URL_EXPIRED = 121

The download URL expired before download could complete. Usually, multiple download attempts will be performed before this is returned.

FAILED_PRECONDITION

public static final int FAILED_PRECONDITION = 9

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

INTERNAL

public static final int INTERNAL = 13

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

INVALID_ARGUMENT

public static final int INVALID_ARGUMENT = 3

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 (for example, an invalid field name).

MODEL_HASH_MISMATCH

public static final int MODEL_HASH_MISMATCH = 102

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

NOT_ENOUGH_SPACE

public static final int NOT_ENOUGH_SPACE = 101

There is not enough space left on the device.

NOT_FOUND

public static final int NOT_FOUND = 5

Some requested resource was not found.

NO_NETWORK_CONNECTION

public static final int NO_NETWORK_CONNECTION = 17

There is no network connection.

OUT_OF_RANGE

public static final int OUT_OF_RANGE = 11

Operation was attempted past the valid range.

PERMISSION_DENIED

public static final int PERMISSION_DENIED = 7

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

RESOURCE_EXHAUSTED

public static final int RESOURCE_EXHAUSTED = 8

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

UNAUTHENTICATED

public static final int UNAUTHENTICATED = 16

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

UNAVAILABLE

public static final int UNAVAILABLE = 14

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

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

UNIMPLEMENTED

public static final int UNIMPLEMENTED = 12

Operation is not implemented or not supported/enabled.

UNKNOWN

public static final int UNKNOWN = 2

Unknown error or an error from a different error domain.

Public fields

code

@FirebaseMlException.Code
public final int code

Public methods

getCode

@FirebaseMlException.Code
public int getCode()

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