Table of Contents

Class StorageException

Namespace
Microsoft.WindowsAzure.Storage
Assembly
Microsoft.WindowsAzure.Storage.dll

Represents an exception thrown by the Azure Storage service.

public class StorageException : Exception, ISerializable
Inheritance
StorageException
Implements
Inherited Members

Constructors

StorageException()

Initializes a new instance of the StorageException class.

public StorageException()

StorageException(RequestResult, string, Exception)

Initializes a new instance of the StorageException class by using the specified parameters.

public StorageException(RequestResult res, string message, Exception inner)

Parameters

res RequestResult

The request result.

message string

The exception message.

inner Exception

The inner exception.

StorageException(SerializationInfo, StreamingContext)

Initializes a new instance of the StorageException class with serialized data.

protected StorageException(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

The SerializationInfo object that holds serialized object data for the exception being thrown.

context StreamingContext

The StreamingContext that contains contextual information about the source or destination.

Remarks

This constructor is called during de-serialization to reconstitute the exception object transmitted over a stream.

StorageException(string)

Initializes a new instance of the StorageException class using the specified error message.

public StorageException(string message)

Parameters

message string

The message that describes the error.

StorageException(string, Exception)

Initializes a new instance of the StorageException class with a specified error message and a reference to the inner exception that generated this exception.

public StorageException(string message, Exception innerException)

Parameters

message string

The exception error message.

innerException Exception

The inner exception.

Properties

RequestInformation

Gets the RequestResult object for this StorageException object.

public RequestResult RequestInformation { get; }

Property Value

RequestResult

The RequestResult object for this StorageException object.

Methods

GetObjectData(SerializationInfo, StreamingContext)

Populates a SerializationInfo object with the data needed to serialize the target object.

public override void GetObjectData(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

The SerializationInfo object to populate with data.

context StreamingContext

The destination context for this serialization.

ToString()

Represents an exception thrown by the Microsoft Azure storage client library.

public override string ToString()

Returns

string

A string that represents the exception.

TranslateException(Exception, RequestResult)

Translates the specified exception into a StorageException.

public static StorageException TranslateException(Exception ex, RequestResult reqResult)

Parameters

ex Exception

The exception to translate.

reqResult RequestResult

The request result.

Returns

StorageException

The storage exception.

TranslateException(Exception, RequestResult, Func<Stream, StorageExtendedErrorInformation>)

Translates the specified exception into a storage exception.

public static StorageException TranslateException(Exception ex, RequestResult reqResult, Func<Stream, StorageExtendedErrorInformation> parseError)

Parameters

ex Exception

The exception to translate.

reqResult RequestResult

The request result.

parseError Func<Stream, StorageExtendedErrorInformation>

The delegate used to parse the error to get extended error information.

Returns

StorageException

The storage exception.