Package com.google.cloud.firestore
Class FirestoreException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.google.cloud.BaseServiceException
com.google.cloud.grpc.BaseGrpcServiceException
com.google.cloud.firestore.FirestoreException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BulkWriterException
public class FirestoreException
extends com.google.cloud.grpc.BaseGrpcServiceException
A Firestore Service exception.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.cloud.BaseServiceException
com.google.cloud.BaseServiceException.Error, com.google.cloud.BaseServiceException.ExceptionData
-
Field Summary
Fields inherited from class com.google.cloud.BaseServiceException
UNKNOWN_CODE
-
Method Summary
Modifier and TypeMethodDescriptionstatic FirestoreException
forApiException
(com.google.api.gax.rpc.ApiException exception) Creates a FirestoreException from an ApiException.static FirestoreException
forApiException
(com.google.api.gax.rpc.ApiException exception, String message) Creates a FirestoreException from an ApiException.static FirestoreException
forInvalidArgument
(String message, Object... params) Creates a FirestoreException with anINVALID_ARGUMENT
status code and the provided message in a nested exception.static FirestoreException
forIOException
(IOException exception, boolean retryable) Creates a FirestoreException from an IOException.static FirestoreException
forServerRejection
(io.grpc.Status status, String message, Object... params) Creates a FirestoreException with the provided GRPC Status code and message in a nested exception.static FirestoreException
forServerRejection
(io.grpc.Status status, Throwable cause, String message, Object... params) Creates a FirestoreException with the provided GRPC Status code and message in a nested exception.io.grpc.Status
Methods inherited from class com.google.cloud.BaseServiceException
equals, getCode, getDebugInfo, getLocation, getReason, hashCode, isRetryable, isRetryable, isRetryable, translate, translate
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
forInvalidArgument
Creates a FirestoreException with anINVALID_ARGUMENT
status code and the provided message in a nested exception.- Returns:
- The FirestoreException
-
forServerRejection
@BetaApi public static FirestoreException forServerRejection(io.grpc.Status status, String message, Object... params) Creates a FirestoreException with the provided GRPC Status code and message in a nested exception.- Returns:
- The FirestoreException
-
forServerRejection
@BetaApi public static FirestoreException forServerRejection(io.grpc.Status status, @Nullable Throwable cause, String message, Object... params) Creates a FirestoreException with the provided GRPC Status code and message in a nested exception.- Returns:
- The FirestoreException
-
forIOException
Creates a FirestoreException from an IOException.- Returns:
- The FirestoreException
-
forApiException
@BetaApi public static FirestoreException forApiException(com.google.api.gax.rpc.ApiException exception) Creates a FirestoreException from an ApiException.- Returns:
- The FirestoreException
-
forApiException
@BetaApi public static FirestoreException forApiException(com.google.api.gax.rpc.ApiException exception, String message) Creates a FirestoreException from an ApiException.- Returns:
- The FirestoreException
-
getStatus
-