通过


HttpCompileException 构造函数

定义

初始化 HttpCompileException 类的新实例。

重载

名称 说明
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

是当前异常原因的异常。 null如果没有innerException,则当前异常在处理内部异常的块中catch引发。

适用于