azure-docs-sdk-java/docs-ref-autogen/com.azure.cosmos.CosmosExce...

276 строки
19 KiB
YAML
Исходник Обычный вид История

### YamlMime:JavaType
uid: "com.azure.cosmos.CosmosException"
fullName: "com.azure.cosmos.CosmosException"
name: "CosmosException"
nameWithType: "CosmosException"
summary: "This class defines a custom exception type for all operations on Cosmos<wbr>Client in the Azure Cosmos DB database service."
inheritances:
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Throwable?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Exception?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.RuntimeException?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"com.azure.core.exception.AzureException?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
inheritedMembers:
- "java.lang.Object.clone()"
- "java.lang.Object.equals(java.lang.Object)"
- "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(long)"
- "java.lang.Object.wait(long,int)"
- "java.lang.Throwable.addSuppressed(java.lang.Throwable)"
- "java.lang.Throwable.fillInStackTrace()"
- "java.lang.Throwable.getCause()"
- "java.lang.Throwable.getLocalizedMessage()"
- "java.lang.Throwable.getMessage()"
- "java.lang.Throwable.getStackTrace()"
- "java.lang.Throwable.getSuppressed()"
- "java.lang.Throwable.initCause(java.lang.Throwable)"
- "java.lang.Throwable.printStackTrace()"
- "java.lang.Throwable.printStackTrace(java.io.PrintStream)"
- "java.lang.Throwable.printStackTrace(java.io.PrintWriter)"
- "java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[])"
- "java.lang.Throwable.toString()"
syntax: "public class CosmosException extends AzureException"
constructors:
- uid: "com.azure.cosmos.CosmosException.CosmosException(int,com.azure.cosmos.implementation.CosmosError,java.util.Map<java.lang.String,java.lang.String>)"
fullName: "com.azure.cosmos.CosmosException.CosmosException(int statusCode, CosmosError cosmosErrorResource, Map<String,String> responseHeaders)"
name: "CosmosException(int statusCode, CosmosError cosmosErrorResource, Map<String,String> responseHeaders)"
nameWithType: "CosmosException.CosmosException(int statusCode, CosmosError cosmosErrorResource, Map<String,String> responseHeaders)"
summary: "Creates a new instance of the Cosmos<wbr>Exception class."
modifiers:
- "protected"
parameters:
- description: "the http status code of the response."
name: "statusCode"
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
- description: "the error resource object."
name: "cosmosErrorResource"
type: "<xref href=\"com.azure.cosmos.implementation.CosmosError?alt=com.azure.cosmos.implementation.CosmosError&text=CosmosError\" data-throw-if-not-resolved=\"False\" />"
- description: "the response headers."
name: "responseHeaders"
type: "<xref href=\"java.util.Map?alt=java.util.Map&text=Map\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />,<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />&gt;"
syntax: "protected CosmosException(int statusCode, CosmosError cosmosErrorResource, Map<String,String> responseHeaders)"
desc: "Creates a new instance of the CosmosException class."
- uid: "com.azure.cosmos.CosmosException.CosmosException(int,java.lang.Exception)"
fullName: "com.azure.cosmos.CosmosException.CosmosException(int statusCode, Exception innerException)"
name: "CosmosException(int statusCode, Exception innerException)"
nameWithType: "CosmosException.CosmosException(int statusCode, Exception innerException)"
summary: "Creates a new instance of the Cosmos<wbr>Exception class."
modifiers:
- "protected"
parameters:
- description: "the http status code of the response."
name: "statusCode"
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
- description: "the original exception."
name: "innerException"
type: "<xref href=\"java.lang.Exception?alt=java.lang.Exception&text=Exception\" data-throw-if-not-resolved=\"False\" />"
syntax: "protected CosmosException(int statusCode, Exception innerException)"
desc: "Creates a new instance of the CosmosException class."
- uid: "com.azure.cosmos.CosmosException.CosmosException(int,java.lang.String)"
fullName: "com.azure.cosmos.CosmosException.CosmosException(int statusCode, String errorMessage)"
name: "CosmosException(int statusCode, String errorMessage)"
nameWithType: "CosmosException.CosmosException(int statusCode, String errorMessage)"
summary: "Creates a new instance of the Cosmos<wbr>Exception class."
modifiers:
- "protected"
parameters:
- description: "the http status code of the response."
name: "statusCode"
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
- description: "the error message."
name: "errorMessage"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
syntax: "protected CosmosException(int statusCode, String errorMessage)"
desc: "Creates a new instance of the CosmosException class."
- uid: "com.azure.cosmos.CosmosException.CosmosException(int,java.lang.String,java.util.Map<java.lang.String,java.lang.String>,java.lang.Throwable)"
fullName: "com.azure.cosmos.CosmosException.CosmosException(int statusCode, String message, Map<String,String> responseHeaders, Throwable cause)"
name: "CosmosException(int statusCode, String message, Map<String,String> responseHeaders, Throwable cause)"
nameWithType: "CosmosException.CosmosException(int statusCode, String message, Map<String,String> responseHeaders, Throwable cause)"
summary: "Creates a new instance of the Cosmos<wbr>Exception class."
modifiers:
- "protected"
parameters:
- description: "the http status code of the response."
name: "statusCode"
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
- description: "the string message."
name: "message"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
- description: "the response headers."
name: "responseHeaders"
type: "<xref href=\"java.util.Map?alt=java.util.Map&text=Map\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />,<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />&gt;"
- description: "the inner exception"
name: "cause"
type: "<xref href=\"java.lang.Throwable?alt=java.lang.Throwable&text=Throwable\" data-throw-if-not-resolved=\"False\" />"
syntax: "protected CosmosException(int statusCode, String message, Map<String,String> responseHeaders, Throwable cause)"
desc: "Creates a new instance of the CosmosException class."
- uid: "com.azure.cosmos.CosmosException.CosmosException(java.lang.String,int,com.azure.cosmos.implementation.CosmosError,java.util.Map<java.lang.String,java.lang.String>)"
fullName: "com.azure.cosmos.CosmosException.CosmosException(String resourceAddress, int statusCode, CosmosError cosmosErrorResource, Map<String,String> responseHeaders)"
name: "CosmosException(String resourceAddress, int statusCode, CosmosError cosmosErrorResource, Map<String,String> responseHeaders)"
nameWithType: "CosmosException.CosmosException(String resourceAddress, int statusCode, CosmosError cosmosErrorResource, Map<String,String> responseHeaders)"
summary: "Creates a new instance of the Cosmos<wbr>Exception class."
modifiers:
- "protected"
parameters:
- description: "the address of the resource the request is associated with."
name: "resourceAddress"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
- description: "the http status code of the response."
name: "statusCode"
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
- description: "the error resource object."
name: "cosmosErrorResource"
type: "<xref href=\"com.azure.cosmos.implementation.CosmosError?alt=com.azure.cosmos.implementation.CosmosError&text=CosmosError\" data-throw-if-not-resolved=\"False\" />"
- description: "the response headers."
name: "responseHeaders"
type: "<xref href=\"java.util.Map?alt=java.util.Map&text=Map\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />,<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />&gt;"
syntax: "protected CosmosException(String resourceAddress, int statusCode, CosmosError cosmosErrorResource, Map<String,String> responseHeaders)"
desc: "Creates a new instance of the CosmosException class."
- uid: "com.azure.cosmos.CosmosException.CosmosException(java.lang.String,int,com.azure.cosmos.implementation.CosmosError,java.util.Map<java.lang.String,java.lang.String>,java.lang.Throwable)"
fullName: "com.azure.cosmos.CosmosException.CosmosException(String resourceAddress, int statusCode, CosmosError cosmosErrorResource, Map<String,String> responseHeaders, Throwable cause)"
name: "CosmosException(String resourceAddress, int statusCode, CosmosError cosmosErrorResource, Map<String,String> responseHeaders, Throwable cause)"
nameWithType: "CosmosException.CosmosException(String resourceAddress, int statusCode, CosmosError cosmosErrorResource, Map<String,String> responseHeaders, Throwable cause)"
summary: "Creates a new instance of the Cosmos<wbr>Exception class."
modifiers:
- "protected"
parameters:
- description: "the address of the resource the request is associated with."
name: "resourceAddress"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
- description: "the http status code of the response."
name: "statusCode"
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
- description: "the error resource object."
name: "cosmosErrorResource"
type: "<xref href=\"com.azure.cosmos.implementation.CosmosError?alt=com.azure.cosmos.implementation.CosmosError&text=CosmosError\" data-throw-if-not-resolved=\"False\" />"
- description: "the response headers."
name: "responseHeaders"
type: "<xref href=\"java.util.Map?alt=java.util.Map&text=Map\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />,<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />&gt;"
- description: "the inner exception"
name: "cause"
type: "<xref href=\"java.lang.Throwable?alt=java.lang.Throwable&text=Throwable\" data-throw-if-not-resolved=\"False\" />"
syntax: "protected CosmosException(String resourceAddress, int statusCode, CosmosError cosmosErrorResource, Map<String,String> responseHeaders, Throwable cause)"
desc: "Creates a new instance of the CosmosException class."
- uid: "com.azure.cosmos.CosmosException.CosmosException(java.lang.String,java.lang.Exception,java.util.Map<java.lang.String,java.lang.String>,int,java.lang.String)"
fullName: "com.azure.cosmos.CosmosException.CosmosException(String message, Exception exception, Map<String,String> responseHeaders, int statusCode, String resourceAddress)"
name: "CosmosException(String message, Exception exception, Map<String,String> responseHeaders, int statusCode, String resourceAddress)"
nameWithType: "CosmosException.CosmosException(String message, Exception exception, Map<String,String> responseHeaders, int statusCode, String resourceAddress)"
summary: "Creates a new instance of the Cosmos<wbr>Exception class."
modifiers:
- "protected"
parameters:
- description: "the string message."
name: "message"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
- description: "the exception object."
name: "exception"
type: "<xref href=\"java.lang.Exception?alt=java.lang.Exception&text=Exception\" data-throw-if-not-resolved=\"False\" />"
- description: "the response headers."
name: "responseHeaders"
type: "<xref href=\"java.util.Map?alt=java.util.Map&text=Map\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />,<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />&gt;"
- description: "the http status code of the response."
name: "statusCode"
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
- description: "the address of the resource the request is associated with."
name: "resourceAddress"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
syntax: "protected CosmosException(String message, Exception exception, Map<String,String> responseHeaders, int statusCode, String resourceAddress)"
desc: "Creates a new instance of the CosmosException class."
methods:
- uid: "com.azure.cosmos.CosmosException.getActivityId()"
fullName: "com.azure.cosmos.CosmosException.getActivityId()"
name: "getActivityId()"
nameWithType: "CosmosException.getActivityId()"
summary: "Gets the activity ID associated with the request."
syntax: "public String getActivityId()"
desc: "Gets the activity ID associated with the request."
returns:
description: "the activity ID."
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosException.getDiagnostics()"
fullName: "com.azure.cosmos.CosmosException.getDiagnostics()"
name: "getDiagnostics()"
nameWithType: "CosmosException.getDiagnostics()"
summary: "Gets the Cosmos Diagnostic Statistics associated with this exception."
syntax: "public CosmosDiagnostics getDiagnostics()"
desc: "Gets the Cosmos Diagnostic Statistics associated with this exception."
returns:
description: "Cosmos Diagnostic Statistics associated with this exception."
type: "<xref href=\"com.azure.cosmos.CosmosDiagnostics?alt=com.azure.cosmos.CosmosDiagnostics&text=CosmosDiagnostics\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosException.getMessage()"
fullName: "com.azure.cosmos.CosmosException.getMessage()"
name: "getMessage()"
nameWithType: "CosmosException.getMessage()"
overridden: "java.lang.Throwable.getMessage()"
syntax: "public String getMessage()"
returns:
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosException.getRequestCharge()"
fullName: "com.azure.cosmos.CosmosException.getRequestCharge()"
name: "getRequestCharge()"
nameWithType: "CosmosException.getRequestCharge()"
summary: "Gets the request charge as request units (RU) consumed by the operation."
syntax: "public double getRequestCharge()"
desc: "Gets the request charge as request units (RU) consumed by the operation.\n\nFor more information about the RU and factors that can impact the effective charges please visit [Request Units in Azure Cosmos DB][]\n\n\n[Request Units in Azure Cosmos DB]: https://docs.microsoft.com/en-us/azure/cosmos-db/request-units"
returns:
description: "the request charge."
type: "<xref href=\"double?alt=double&text=double\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosException.getResponseHeaders()"
fullName: "com.azure.cosmos.CosmosException.getResponseHeaders()"
name: "getResponseHeaders()"
nameWithType: "CosmosException.getResponseHeaders()"
summary: "Gets the response headers as key-value pairs"
syntax: "public Map<String,String> getResponseHeaders()"
desc: "Gets the response headers as key-value pairs"
returns:
description: "the response headers"
type: "<xref href=\"java.util.Map?alt=java.util.Map&text=Map\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />,<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.cosmos.CosmosException.getRetryAfterDuration()"
fullName: "com.azure.cosmos.CosmosException.getRetryAfterDuration()"
name: "getRetryAfterDuration()"
nameWithType: "CosmosException.getRetryAfterDuration()"
summary: "Gets the recommended time duration after which the client can retry failed requests"
syntax: "public Duration getRetryAfterDuration()"
desc: "Gets the recommended time duration after which the client can retry failed requests"
returns:
description: "the recommended time duration after which the client can retry failed\n requests."
type: "<xref href=\"java.time.Duration?alt=java.time.Duration&text=Duration\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosException.getStatusCode()"
fullName: "com.azure.cosmos.CosmosException.getStatusCode()"
name: "getStatusCode()"
nameWithType: "CosmosException.getStatusCode()"
summary: "Gets the http status code."
syntax: "public int getStatusCode()"
desc: "Gets the http status code."
returns:
description: "the status code."
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosException.getSubStatusCode()"
fullName: "com.azure.cosmos.CosmosException.getSubStatusCode()"
name: "getSubStatusCode()"
nameWithType: "CosmosException.getSubStatusCode()"
summary: "Gets the sub status code."
syntax: "public int getSubStatusCode()"
desc: "Gets the sub status code."
returns:
description: "the status code."
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosException.toString()"
fullName: "com.azure.cosmos.CosmosException.toString()"
name: "toString()"
nameWithType: "CosmosException.toString()"
overridden: "java.lang.Throwable.toString()"
syntax: "public String toString()"
returns:
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
type: "class"
desc: "This class defines a custom exception type for all operations on CosmosClient in the Azure Cosmos DB database service. Applications are expected to catch CosmosException and handle errors as appropriate when calling methods on CosmosClient.\n\nErrors coming from the service during normal execution are converted to CosmosException before returning to the application with the following exception:\n\nWhen a BE error is encountered during a QueryIterable<T> iteration, an IllegalStateException is thrown instead of CosmosException.\n\nWhen a transport level error happens that request is not able to reach the service, an IllegalStateException is thrown instead of CosmosException."
metadata: {}
package: "com.azure.cosmos"
artifact: com.azure:azure-cosmos:4.35.1