AzureStorageUtils.EvaluateException Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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.