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.DataAccessExceptionPublic class extending DataAccessException, exposes innerException. Every API inCosmosRepositoryandReactiveCosmosRepositoryshould throwCosmosAccessException. 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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected CosmosExceptioncosmosExceptionCosmos exception.
-
Constructor Summary
Constructors Constructor Description CosmosAccessException(String msg)Construct aCosmosDBAccessExceptionwith the specified detail message.CosmosAccessException(String msg, Exception cause)Construct aCosmosDBAccessExceptionwith the specified detail message and nested exception.CosmosAccessException(String msg, Throwable cause)Construct aCosmosDBAccessExceptionwith the specified detail message.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CosmosExceptiongetCosmosException()To get exception object for cosmos client-
Methods 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 Detail
-
cosmosException
protected final CosmosException cosmosException
Cosmos exception.
-
-
Constructor Detail
-
CosmosAccessException
public CosmosAccessException(String msg)
Construct aCosmosDBAccessExceptionwith the specified detail message.- Parameters:
msg- the detail message
-
CosmosAccessException
public CosmosAccessException(@Nullable String msg, @Nullable Throwable cause)Construct aCosmosDBAccessExceptionwith the specified detail message. and nested exception.- Parameters:
msg- the detail messagecause- the nested Throwable
-
-
Method Detail
-
getCosmosException
public CosmosException getCosmosException()
To get exception object for cosmos client- Returns:
- CosmosException
-
-