HttpCompileException 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 HttpCompileException 類別的新執行個體。
多載
| 名稱 | Description |
|---|---|
| HttpCompileException() |
初始化 HttpCompileException 類別的新執行個體。 |
| HttpCompileException(String) |
初始化 HttpCompileException 類別的新執行個體。 |
| HttpCompileException(CompilerResults, String) |
初始化 HttpCompileException 類別的新執行個體。 |
| HttpCompileException(String, Exception) |
使用指定的錯誤訊息和造成這個例外狀況的內部例外狀況參考,初始化 HttpCompileException 類別的新實例。 |
HttpCompileException()
初始化 HttpCompileException 類別的新執行個體。
public:
HttpCompileException();
public HttpCompileException();
Public Sub New ()
適用於
HttpCompileException(String)
初始化 HttpCompileException 類別的新執行個體。
public:
HttpCompileException(System::String ^ message);
public HttpCompileException(string message);
new System.Web.HttpCompileException : string -> System.Web.HttpCompileException
Public Sub New (message As String)
參數
- message
- String
例外訊息用來指定錯誤發生時。
適用於
HttpCompileException(CompilerResults, String)
初始化 HttpCompileException 類別的新執行個體。
public:
HttpCompileException(System::CodeDom::Compiler::CompilerResults ^ results, System::String ^ sourceCode);
public HttpCompileException(System.CodeDom.Compiler.CompilerResults results, string sourceCode);
new System.Web.HttpCompileException : System.CodeDom.Compiler.CompilerResults * string -> System.Web.HttpCompileException
Public Sub New (results As CompilerResults, sourceCode As String)
參數
- results
- CompilerResults
CompilerResults一個包含編譯器輸出與錯誤資訊的編譯器。
- sourceCode
- String
錯誤發生時,包含原始碼的檔案路徑。
備註
對於 sourceCode 參數,你可以傳遞任何描述錯誤條件的字串資訊;檔案或路徑不需檢查。 該 SourceCode 屬性會回傳作為參數值的字串。 若使用不需參數的 sourceCode 建構子,性質 SourceCode 為 null。
適用於
HttpCompileException(String, Exception)
使用指定的錯誤訊息和造成這個例外狀況的內部例外狀況參考,初始化 HttpCompileException 類別的新實例。
public:
HttpCompileException(System::String ^ message, Exception ^ innerException);
public HttpCompileException(string message, Exception innerException);
new System.Web.HttpCompileException : string * Exception -> System.Web.HttpCompileException
Public Sub New (message As String, innerException As Exception)
參數
- message
- String
說明例外狀況原因的錯誤訊息。
- innerException
- Exception
造成目前例外狀況的例外狀況。 若 innerException 不是 null,則在處理內部例外的區塊中提出 catch 當前例外。