public class StorageException extends Exception
| Modifier and Type | Field and Description |
|---|---|
protected String |
errorCode
Represents the error code returned by the operation.
|
protected StorageExtendedErrorInformation |
extendedErrorInformation
Represents the extended error information returned by the operation.
|
| Constructor and Description |
|---|
StorageException(String errorCode,
String message,
Exception innerException)
Creates an instance of the
StorageException class using the specified parameters. |
StorageException(String errorCode,
String message,
int statusCode,
StorageExtendedErrorInformation extendedErrorInfo,
Exception innerException)
Creates an instance of the
StorageException class using the specified parameters. |
| Modifier and Type | Method and Description |
|---|---|
String |
getErrorCode()
Gets the error code returned by the operation.
|
StorageExtendedErrorInformation |
getExtendedErrorInformation()
Gets the extended error information returned by the operation.
|
int |
getHttpStatusCode()
Gets the HTTP status code returned by the operation.
|
static StorageException |
translateClientException(Exception cause)
RESERVED FOR INTERNAL USE.
|
static StorageException |
translateException(StorageRequest<?,?,?> request,
Exception cause,
OperationContext opContext)
RESERVED FOR INTERNAL USE.
|
protected static StorageException |
translateFromHttpStatus(int statusCode,
String statusDescription,
Exception inner)
Translates the specified HTTP status code into a storage exception.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringprotected String errorCode
protected StorageExtendedErrorInformation extendedErrorInformation
StorageExtendedErrorInformationpublic StorageException(String errorCode, String message, Exception innerException)
StorageException class using the specified parameters. The
status code will be 306 to represent a client side exception with null for the extended error information.errorCode - A String that represents the error code returned by the operation.message - A String that represents the error message returned by the operation.innerException - An Exception object that represents a reference to the initial exception, if one exists.StorageExtendedErrorInformationpublic StorageException(String errorCode, String message, int statusCode, StorageExtendedErrorInformation extendedErrorInfo, Exception innerException)
StorageException class using the specified parameters.errorCode - A String that represents the error code returned by the operation.message - A String that represents the error message returned by the operation.statusCode - The HTTP status code returned by the operation.extendedErrorInfo - A StorageExtendedErrorInformation object that represents the extended error information
returned by the operation.innerException - An Exception object that represents a reference to the initial exception, if one exists.StorageExtendedErrorInformationpublic static StorageException translateClientException(Exception cause)
cause - An Exception object that represents the exception to translate.StorageException object that represents translated exception.public static StorageException translateException(StorageRequest<?,?,?> request, Exception cause, OperationContext opContext)
request - An HttpURLConnection object that represents the request whose exception is being
translated.cause - An Exception object that represents the exception to translate.StorageException object that represents translated exception.protected static StorageException translateFromHttpStatus(int statusCode, String statusDescription, Exception inner)
statusCode - The HTTP status code returned by the operation.statusDescription - A String that represents the status description.inner - An Exception object that represents a reference to the initial exception, if one exists.StorageException object that represents translated exception.public String getErrorCode()
public StorageExtendedErrorInformation getExtendedErrorInformation()
public int getHttpStatusCode()
Copyright © 2019. All rights reserved.