HttpParseException 建構函式

定義

初始化 HttpParseException 類別的新執行個體。

多載

名稱 Description
HttpParseException()

初始化 HttpParseException 類別的新執行個體。

HttpParseException(String)

使用指定的錯誤訊息,初始化 HttpParseException 類別的新實例。

HttpParseException(String, Exception)

初始化類別的新實例 HttpParseException ,並以指定錯誤訊息及內部參考。

HttpParseException(String, Exception, String, String, Int32)

初始化類別的新實例 HttpParseException ,並提供被編譯的原始碼及異常發生的行號等特定資訊。

HttpParseException()

初始化 HttpParseException 類別的新執行個體。

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

適用於

HttpParseException(String)

使用指定的錯誤訊息,初始化 HttpParseException 類別的新實例。

public:
 HttpParseException(System::String ^ message);
public HttpParseException(string message);
new System.Web.HttpParseException : string -> System.Web.HttpParseException
Public Sub New (message As String)

參數

message
String

例外訊息用來指定錯誤發生時。

範例

以下範例示範了建構子的 HttpException 使用方式。 完整且可運作的程式碼範例,請參閱 HttpParseException 概述主題。

throw new HttpParseException("This custom HtmlSelect control" +                                                  "requires child elements of the form \"MyCustomOption\"");
Throw New HttpParseException("This custom HtmlSelect control" & _ 
         "requires child elements of the form ""MyCustomOption""")

適用於

HttpParseException(String, Exception)

初始化類別的新實例 HttpParseException ,並以指定錯誤訊息及內部參考。

public:
 HttpParseException(System::String ^ message, Exception ^ innerException);
public HttpParseException(string message, Exception innerException);
new System.Web.HttpParseException : string * Exception -> System.Web.HttpParseException
Public Sub New (message As String, innerException As Exception)

參數

message
String

例外訊息用來指定錯誤發生時。

innerException
Exception

該例外即為當前例外的原因。 若 innerException 參數不 null為 ,則在處理內部異常的區塊中提出 catch 當前例外。

適用於

HttpParseException(String, Exception, String, String, Int32)

初始化類別的新實例 HttpParseException ,並提供被編譯的原始碼及異常發生的行號等特定資訊。

public:
 HttpParseException(System::String ^ message, Exception ^ innerException, System::String ^ virtualPath, System::String ^ sourceCode, int line);
public HttpParseException(string message, Exception innerException, string virtualPath, string sourceCode, int line);
new System.Web.HttpParseException : string * Exception * string * string * int -> System.Web.HttpParseException
Public Sub New (message As String, innerException As Exception, virtualPath As String, sourceCode As String, line As Integer)

參數

message
String

例外訊息用來指定錯誤發生時。

innerException
Exception

該例外即為當前例外的原因。 如果 innerException 不是 null,則會在處理內部例外狀況的 catch 區塊中引發目前的例外狀況。

virtualPath
String

例外的虛擬路徑。

sourceCode
String

當例外發生時,原始碼正在編譯。

line
Int32

例外發生的行號。

適用於