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
String getCode()

Gets the error code.

String getErrorDetails()

Gets the error details.

String getMessage()

Gets the error message.

String getPartitionedQueryExecutionInfo()

Gets the partitioned query execution info.

Inherited Members

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