The base class for Windows Azure storage service exceptions. Namespace: Microsoft.WindowsAzure.StorageClient
Assembly: Microsoft.WindowsAzure.StorageClient (in Microsoft.WindowsAzure.StorageClient.dll)
Usage
Visual Basic |
---|
Dim instance As StorageException |
Syntax
Visual Basic |
---|
<SerializableAttribute> _ Public MustInherit Class StorageException Inherits Exception |
C# |
---|
[SerializableAttribute] public abstract class StorageException : Exception |
C++ |
---|
[SerializableAttribute] public ref class StorageException abstract : public Exception |
J# |
---|
JScript |
---|
Remarks
Based on the source of the error that caused the exception to be thrown, Windows Azure storage services may throw a StorageClientException or a StorageServerException. The StorageException will never be thrown directly. However, it can be difficult or impossible to predict which of the derived exception types will be thrown for an arbitrary piece of code. Regardless, the StorageException base class usually contains sufficient detail regarding the error for you to determine how your application should proceed. Additional guidance regarding how to handle the different exception types can be found in the documentation for the derived classes, StorageClientException or StorageServerException.
C# | Copy Code |
---|---|
try { // Storage access code } catch (Microsoft.WindowsAzure.StorageClient.StorageException ex) { // Inspect ex.ErrorCode or ex.StatusCode for error information } catch (System.Exception ex) { // General exception handler } |
When the StorageException is also a StorageClientException exception, additional error details can be found in the ExtendedErrorInformation property. Otherwise, this property is null
.
Inheritance Hierarchy
System.Exception
Microsoft.WindowsAzure.StorageClient.StorageException
Microsoft.WindowsAzure.StorageClient.StorageClientException
Microsoft.WindowsAzure.StorageClient.StorageServerException