StorageException

public class StorageException extends FirebaseException


Represents an Exception resulting from an operation on a StorageReference.

Summary

Nested types

@Retention(value = RetentionPolicy.SOURCE)
@IntDef(value = )
public annotation StorageException.ErrorCode

An ErrorCode indicates the source of a failed StorageTask or operation.

Constants

static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
ERROR_UNKNOWN = -13000

Public fields

Throwable
final int
final int

Public methods

static @NonNull StorageException
static @NonNull StorageException
static @Nullable StorageException
fromExceptionAndHttpCode(
    @Nullable Throwable exception,
    int httpResultCode
)
synchronized @Nullable Throwable

Returns the cause of this Throwable, or null if there is no cause.

int
int
boolean

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

ERROR_BUCKET_NOT_FOUND

public static final int ERROR_BUCKET_NOT_FOUND = -13011

ERROR_CANCELED

public static final int ERROR_CANCELED = -13040

ERROR_INVALID_CHECKSUM

public static final int ERROR_INVALID_CHECKSUM = -13031

ERROR_NOT_AUTHENTICATED

public static final int ERROR_NOT_AUTHENTICATED = -13020

ERROR_NOT_AUTHORIZED

public static final int ERROR_NOT_AUTHORIZED = -13021

ERROR_OBJECT_NOT_FOUND

public static final int ERROR_OBJECT_NOT_FOUND = -13010

ERROR_PROJECT_NOT_FOUND

public static final int ERROR_PROJECT_NOT_FOUND = -13012

ERROR_QUOTA_EXCEEDED

public static final int ERROR_QUOTA_EXCEEDED = -13013

ERROR_RETRY_LIMIT_EXCEEDED

public static final int ERROR_RETRY_LIMIT_EXCEEDED = -13030

ERROR_UNKNOWN

public static final int ERROR_UNKNOWN = -13000

Public fields

cause

public Throwable cause

errorCode

public final int errorCode

httpResultCode

public final int httpResultCode

Public methods

fromErrorStatus

public static @NonNull StorageException fromErrorStatus(@NonNull Status status)

fromException

public static @NonNull StorageException fromException(@NonNull Throwable exception)

fromExceptionAndHttpCode

public static @Nullable StorageException fromExceptionAndHttpCode(
    @Nullable Throwable exception,
    int httpResultCode
)

getCause

synchronized public @Nullable Throwable getCause()

Returns the cause of this Throwable, or null if there is no cause.

getErrorCode

@StorageException.ErrorCode
public int getErrorCode()

getHttpResultCode

public int getHttpResultCode()
Returns
int

the Http result code (if one exists) from a network operation.

getIsRecoverableException

public boolean getIsRecoverableException()
Returns
boolean

True if this request failed due to a network condition that may be resolved in a future attempt.