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
RequestResultThe request result.
message
stringThe exception message.
inner
ExceptionThe inner exception.
StorageException(SerializationInfo, StreamingContext)
Initializes a new instance of the StorageException class with serialized data.
protected StorageException(SerializationInfo info, StreamingContext context)
Parameters
info
SerializationInfoThe SerializationInfo object that holds serialized object data for the exception being thrown.
context
StreamingContextThe 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
stringThe 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
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
SerializationInfoThe SerializationInfo object to populate with data.
context
StreamingContextThe 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
ExceptionThe exception to translate.
reqResult
RequestResultThe 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
ExceptionThe exception to translate.
reqResult
RequestResultThe request result.
parseError
Func<Stream, StorageExtendedErrorInformation>The delegate used to parse the error to get extended error information.
Returns
- StorageException
The storage exception.