Error Class

public class Error
extends Resource

Encapsulates error related details in the Azure Cosmos DB database service.

Constructor Summary

Constructor Description
Error()

Initialize a new instance of the Error object.

Error(String jsonString)

Initialize a new instance of the Error object from a JSON string.

Error(String errorCode, String message)

Initialize a new instance of the Error object.

Error(String errorCode, String message, String additionalErrorInfo)

Initialize a new instance of the Error object.

Method Summary

Modifier and Type Method and Description
java.lang.String getCode()

Gets the error code.

java.lang.String getErrorDetails()

Gets the error details.

java.lang.String getMessage()

Gets the error message.

java.lang.String getPartitionedQueryExecutionInfo()

Gets the partitioned query execution info.

Methods inherited from JsonSerializable

Methods inherited from Resource

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

Error

public Error()

Initialize a new instance of the Error object.

Error

public Error(String jsonString)

Initialize a new instance of the Error object from a JSON string.

Parameters:

jsonString - the jsonString that represents the error.

Error

public Error(String errorCode, String message)

Initialize a new instance of the Error object.

Parameters:

errorCode - the error code.
message - the error message.

Error

public Error(String errorCode, String message, String additionalErrorInfo)

Initialize a new instance of the Error object.

Parameters:

errorCode - the error code.
message - the error message.
additionalErrorInfo - additional error info.

Method Details

getCode

public String getCode()

Gets the error code.

Returns:

the error code.

getErrorDetails

public String getErrorDetails()

Gets the error details.

Returns:

the error details.

getMessage

public String getMessage()

Gets the error message.

Returns:

the error message.

getPartitionedQueryExecutionInfo

public String getPartitionedQueryExecutionInfo()

Gets the partitioned query execution info.

Returns:

the partitioned query execution info.

Applies to