AzureStorageUtils.EvaluateException 方法

定义

检查存储异常,如果适用,则提取 HTTP 状态代码,如果为 getRESTErrors=trueREST 错误代码。

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

参数

e
Exception

要检查的执行。

httpStatusCode
HttpStatusCode

如果适用,则输出 HTTP 状态代码,否则为 HttpStatusCode.Unused (306)

restStatus
String

如果适用,则输出 REST 错误代码时 getRESTErrors=true,否则 null

getRESTErrors
Boolean

是否还应检查/提取 REST 错误代码。

返回

如果提取了 HTTP 状态代码和 REST 错误,则返回 true

适用于