SALES: 1-800-867-1380
0 out of 1 rated this helpful - Rate this topic

StorageException Class

Updated: April 24, 2013

[This topic is part of the Windows Azure Storage Client Library 1.7, which has been deprecated. The current recommended version is Storage Client Library 3.0.]

The base class for Windows Azure storage service exceptions.

Namespace: Microsoft.WindowsAzure.StorageClient
Assembly: Microsoft.WindowsAzure.StorageClient (in Microsoft.WindowsAzure.StorageClient.dll)
'Usage

[SerializableAttribute] 
public abstract class StorageException : Exception

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.


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.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows Vista, Windows 7 and Windows Server 2008

Target Platforms

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.