CosmosAccessException Class
- 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
- com.
- org.
- org.
- java.
- java.
- java.
public class CosmosAccessException
extends org.springframework.dao.DataAccessException
Public class extending DataAccessException, exposes innerException. Every API in CosmosRepository<T,ID> and ReactiveCosmosRepository<T,K> 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.
Field Summary
Modifier and Type | Field and Description |
---|---|
protected final
Cosmos |
cosmosException
Cosmos exception. |
Constructor Summary
Constructor | Description |
---|---|
CosmosAccessException(String msg) |
Construct a |
CosmosAccessException(String msg, Exception cause) |
Construct a |
CosmosAccessException(String msg, Throwable cause) |
Construct a |
Method Summary
Modifier and Type | Method and Description |
---|---|
Cosmos |
getCosmosException()
To get exception object for cosmos client |
Methods inherited from java.lang.Object
Methods inherited from java.lang.Throwable
Methods inherited from org.springframework.core.NestedRuntimeException
Field Details
cosmosException
protected final CosmosException cosmosException
Cosmos exception.
Constructor Details
CosmosAccessException
public CosmosAccessException(String msg)
Construct a CosmosDBAccessException
with the specified detail message.
Parameters:
CosmosAccessException
public CosmosAccessException(String msg, Exception cause)
Construct a CosmosDBAccessException
with the specified detail message and nested exception.
Parameters:
CosmosAccessException
public CosmosAccessException(String msg, Throwable cause)
Construct a CosmosDBAccessException
with the specified detail message. and nested exception.
Parameters:
Method Details
getCosmosException
public CosmosException getCosmosException()
To get exception object for cosmos client
Returns:
Applies to
Azure SDK for Java