Class CosmosAccessException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.core.NestedRuntimeException
org.springframework.dao.DataAccessException
com.azure.spring.data.cosmos.exception.CosmosAccessException
- All Implemented Interfaces:
Serializable
public class CosmosAccessException
extends org.springframework.dao.DataAccessException
Public class extending DataAccessException, exposes innerException.
Every API in
CosmosRepository
and ReactiveCosmosRepository
should throw CosmosAccessException
.
innerException refers to the exception thrown by CosmosDB SDK. Callers of repository APIs can
rely on innerException for any retriable logic, or for more details on the failure of
the operation.- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConstruct aCosmosDBAccessException
with the specified detail message.CosmosAccessException
(String msg, Exception cause) Construct aCosmosDBAccessException
with the specified detail message and nested exception.CosmosAccessException
(String msg, Throwable cause) Construct aCosmosDBAccessException
with the specified detail message. -
Method Summary
Modifier and TypeMethodDescriptionTo get exception object for cosmos clientMethods inherited from class org.springframework.core.NestedRuntimeException
contains, getMessage, getMostSpecificCause, getRootCause
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
cosmosException
Cosmos exception.
-
-
Constructor Details
-
CosmosAccessException
Construct aCosmosDBAccessException
with the specified detail message.- Parameters:
msg
- the detail message
-
CosmosAccessException
Construct aCosmosDBAccessException
with the specified detail message. and nested exception.- Parameters:
msg
- the detail messagecause
- the nested Throwable
-
CosmosAccessException
Construct aCosmosDBAccessException
with the specified detail message and nested exception.- Parameters:
msg
- the detail messagecause
- the nested exception
-
-
Method Details
-
getCosmosException
To get exception object for cosmos client- Returns:
- CosmosException
-