Edit

Share via


AzureStorageUtils.EvaluateException Method

Definition

Examine a storage exception, and if applicable extracts the HTTP status code, and REST error code if getRESTErrors=true.

public static bool EvaluateException (Exception e, out System.Net.HttpStatusCode httpStatusCode, out string restStatus, bool getRESTErrors = false);
static member EvaluateException : Exception * HttpStatusCode * string * bool -> bool
Public Shared Function EvaluateException (e As Exception, ByRef httpStatusCode As HttpStatusCode, ByRef restStatus As String, Optional getRESTErrors As Boolean = false) As Boolean

Parameters

e
Exception

Exception to be examined.

httpStatusCode
HttpStatusCode

Output HTTP status code if applicable, otherwise HttpStatusCode.Unused (306)

restStatus
String

When getRESTErrors=true, will output REST error code if applicable, otherwise null

getRESTErrors
Boolean

Whether REST error code should also be examined / extracted.

Returns

Returns true if HTTP status code and REST error were extracted.

Applies to