StorageException Class
- java.
lang. Object - Exception
- com.
microsoft. azure. storage. StorageException
- com.
public class StorageException
Represents an exception for the Microsoft Azure storage service.
Field Summary
Modifier and Type | Field and Description |
---|---|
String |
errorCode
Represents the error code returned by the operation. |
Storage |
extendedErrorInformation
Represents the extended error information returned by the operation. |
Constructor Summary
Constructor | Description |
---|---|
StorageException(final String errorCode, final String message, final Exception innerException) |
Creates an instance of the class using the specified parameters. The status code will be 306 to represent a client side exception with null for the extended error information. |
StorageException(final String errorCode, final String message, final int statusCode, final StorageExtendedErrorInformation extendedErrorInfo, final Exception innerException) |
Creates an instance of the class using the specified parameters. |
Method Summary
Modifier and Type | Method and Description |
---|---|
String |
getErrorCode()
Gets the error code returned by the operation. |
Storage |
getExtendedErrorInformation()
Gets the extended error information returned by the operation. |
int |
getHttpStatusCode()
Gets the HTTP status code returned by the operation. |
Storage |
translateClientException(final Exception cause)
RESERVED FOR INTERNAL USE. Translates the specified exception into a storage exception. |
Storage |
translateException(final StorageRequest<?, ?, ?> request, final Exception cause, final OperationContext opContext)
RESERVED FOR INTERNAL USE. Translates the specified exception into a storage exception. |
Field Details
errorCode
protected String errorCode
Represents the error code returned by the operation.
extendedErrorInformation
protected StorageExtendedErrorInformation extendedErrorInformation
Represents the extended error information returned by the operation.
Constructor Details
StorageException
public StorageException(final String errorCode, final String message, final Exception innerException)
Creates an instance of the class using the specified parameters. The status code will be 306 to represent a client side exception with null for the extended error information.
Parameters:
String
that represents the error code returned by the operation.
String
that represents the error message returned by the operation.
Exception
object that represents a reference to the initial exception, if one exists.
StorageException
public StorageException(final String errorCode, final String message, final int statusCode, final StorageExtendedErrorInformation extendedErrorInfo, final Exception innerException)
Creates an instance of the class using the specified parameters.
Parameters:
String
that represents the error code returned by the operation.
String
that represents the error message returned by the operation.
Exception
object that represents a reference to the initial exception, if one exists.
Method Details
getErrorCode
public String getErrorCode()
Gets the error code returned by the operation.
Returns:
getExtendedErrorInformation
public StorageExtendedErrorInformation getExtendedErrorInformation()
Gets the extended error information returned by the operation.
Returns:
getHttpStatusCode
public int getHttpStatusCode()
Gets the HTTP status code returned by the operation.
Returns:
translateClientException
public static StorageException translateClientException(final Exception cause)
RESERVED FOR INTERNAL USE. Translates the specified exception into a storage exception.
Parameters:
Exception
object that represents the exception to translate.
Returns:
StorageException
object that represents translated exception.translateException
public static StorageException translateException(final StorageRequest request, final Exception cause, final OperationContext opContext)
RESERVED FOR INTERNAL USE. Translates the specified exception into a storage exception.
Parameters:
HttpURLConnection
object that represents the request whose exception is being translated.
Exception
object that represents the exception to translate.
Returns:
StorageException
object that represents translated exception.Applies to
Azure SDK for Java