public class CosmosAccessException
extends org.springframework.dao.DataAccessException
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.| Modifier and Type | Field and Description |
|---|---|
protected CosmosException |
cosmosException |
| Constructor and Description |
|---|
CosmosAccessException(String msg)
Construct a
CosmosDBAccessException with the specified detail message. |
CosmosAccessException(String msg,
Exception cause)
Construct a
CosmosDBAccessException with the specified detail message
and nested exception. |
CosmosAccessException(String msg,
Throwable cause)
Construct a
CosmosDBAccessException with the specified detail message. |
| Modifier and Type | Method and Description |
|---|---|
CosmosException |
getCosmosException()
To get exception object for cosmos client
|
contains, getMessage, getMostSpecificCause, getRootCauseaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringprotected final CosmosException cosmosException
public CosmosAccessException(String msg)
CosmosDBAccessException with the specified detail message.msg - the detail messagepublic CosmosAccessException(@Nullable
String msg,
@Nullable
Throwable cause)
CosmosDBAccessException with the specified detail message.
and nested exception.msg - the detail messagecause - the nested Throwablepublic CosmosException getCosmosException()
Visit the Azure for Java Developers site for more Java documentation, including quick starts, tutorials, and code samples.