HttpRequestException 构造函数

定义

初始化 HttpRequestException 类的新实例。

重载

HttpRequestException()

初始化 HttpRequestException 类的新实例。

HttpRequestException(String)

使用特定的描述当前异常的消息初始化 HttpRequestException 类的新实例。

HttpRequestException(String, Exception)

使用特定的描述当前异常和内部异常的消息初始化 HttpRequestException 类的新实例。

HttpRequestException(String, Exception, Nullable<HttpStatusCode>)

使用特定的描述当前异常、内部异常和 HTTP 状态代码的消息初始化 HttpRequestException 类的新实例。

HttpRequestException(HttpRequestError, String, Exception, Nullable<HttpStatusCode>)

使用特定消息(内部异常、HTTP 状态代码和 HttpRequestError)初始化 类的新实例HttpRequestException

HttpRequestException()

Source:
HttpRequestException.cs
Source:
HttpRequestException.cs
Source:
HttpRequestException.cs

初始化 HttpRequestException 类的新实例。

public:
 HttpRequestException();
public HttpRequestException ();
Public Sub New ()

适用于

HttpRequestException(String)

Source:
HttpRequestException.cs
Source:
HttpRequestException.cs
Source:
HttpRequestException.cs

使用特定的描述当前异常的消息初始化 HttpRequestException 类的新实例。

public:
 HttpRequestException(System::String ^ message);
public HttpRequestException (string message);
public HttpRequestException (string? message);
new System.Net.Http.HttpRequestException : string -> System.Net.Http.HttpRequestException
Public Sub New (message As String)

参数

message
String

描述当前异常的消息。

适用于

HttpRequestException(String, Exception)

Source:
HttpRequestException.cs
Source:
HttpRequestException.cs
Source:
HttpRequestException.cs

使用特定的描述当前异常和内部异常的消息初始化 HttpRequestException 类的新实例。

public:
 HttpRequestException(System::String ^ message, Exception ^ inner);
public HttpRequestException (string message, Exception inner);
public HttpRequestException (string? message, Exception? inner);
new System.Net.Http.HttpRequestException : string * Exception -> System.Net.Http.HttpRequestException
Public Sub New (message As String, inner As Exception)

参数

message
String

描述当前异常的消息。

inner
Exception

内部异常。

适用于

HttpRequestException(String, Exception, Nullable<HttpStatusCode>)

Source:
HttpRequestException.cs
Source:
HttpRequestException.cs
Source:
HttpRequestException.cs

使用特定的描述当前异常、内部异常和 HTTP 状态代码的消息初始化 HttpRequestException 类的新实例。

public:
 HttpRequestException(System::String ^ message, Exception ^ inner, Nullable<System::Net::HttpStatusCode> statusCode);
public HttpRequestException (string? message, Exception? inner, System.Net.HttpStatusCode? statusCode);
new System.Net.Http.HttpRequestException : string * Exception * Nullable<System.Net.HttpStatusCode> -> System.Net.Http.HttpRequestException
Public Sub New (message As String, inner As Exception, statusCode As Nullable(Of HttpStatusCode))

参数

message
String

描述当前异常的消息。

inner
Exception

内部异常。

statusCode
Nullable<HttpStatusCode>

HTTP 状态代码。

适用于

HttpRequestException(HttpRequestError, String, Exception, Nullable<HttpStatusCode>)

Source:
HttpRequestException.cs
Source:
HttpRequestException.cs

使用特定消息(内部异常、HTTP 状态代码和 HttpRequestError)初始化 类的新实例HttpRequestException

public HttpRequestException (System.Net.Http.HttpRequestError httpRequestError, string? message = default, Exception? inner = default, System.Net.HttpStatusCode? statusCode = default);
new System.Net.Http.HttpRequestException : System.Net.Http.HttpRequestError * string * Exception * Nullable<System.Net.HttpStatusCode> -> System.Net.Http.HttpRequestException
Public Sub New (httpRequestError As HttpRequestError, Optional message As String = Nothing, Optional inner As Exception = Nothing, Optional statusCode As Nullable(Of HttpStatusCode) = Nothing)

参数

httpRequestError
HttpRequestError

导致异常的 HttpRequestError

message
String

描述当前异常的消息。

inner
Exception

内部异常。

statusCode
Nullable<HttpStatusCode>

HTTP 状态代码。

适用于