Share via


StorageException.TranslateExceptionAsync Method

Definition

Translates the specified exception into a storage exception.

public static System.Threading.Tasks.Task<Microsoft.Azure.Storage.StorageException> TranslateExceptionAsync(Exception ex, Microsoft.Azure.Storage.RequestResult reqResult, Func<System.IO.Stream,System.Threading.CancellationToken,System.Threading.Tasks.Task<Microsoft.Azure.Storage.StorageExtendedErrorInformation>> parseErrorAsync, System.Threading.CancellationToken cancellationToken, System.Net.Http.HttpResponseMessage response);
static member TranslateExceptionAsync : Exception * Microsoft.Azure.Storage.RequestResult * Func<System.IO.Stream, System.Threading.CancellationToken, System.Threading.Tasks.Task<Microsoft.Azure.Storage.StorageExtendedErrorInformation>> * System.Threading.CancellationToken * System.Net.Http.HttpResponseMessage -> System.Threading.Tasks.Task<Microsoft.Azure.Storage.StorageException>
Public Shared Function TranslateExceptionAsync (ex As Exception, reqResult As RequestResult, parseErrorAsync As Func(Of Stream, CancellationToken, Task(Of StorageExtendedErrorInformation)), cancellationToken As CancellationToken, response As HttpResponseMessage) As Task(Of StorageException)

Parameters

ex
System.Exception

The exception to translate.

reqResult
RequestResult

The request result.

parseErrorAsync
System.Func<System.IO.Stream,System.Threading.CancellationToken,System.Threading.Tasks.Task<StorageExtendedErrorInformation>>

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

cancellationToken
System.Threading.CancellationToken

cancellation token for the async operation

response
System.Net.Http.HttpResponseMessage

Returns

System.Threading.Tasks.Task<StorageException>

The storage exception.

Applies to