ASP ASP错误对象


ASPError 对象显示有关脚本中错误的信息。


ASPError 对象

ASPError 对象在 ASP 3.0 中实现,并且在 IIS5 及更高版本中可用。

ASPError 对象用于显示 ASP 页中的脚本中发生的任何错误的详细信息。

笔记:ASPError 对象是在调用 Server.GetLastError 时创建的,因此只能使用 Server.GetLastError 方法来访问错误信息。

ASPError 对象的属性如下所述(所有属性都是只读的):

特性

Property Description
ASPCode Returns an error code generated by IIS
ASPDescription Returns a detailed description of the error (if the error is ASP-related)
Category Returns the source of the error (was the error generated by ASP? By a scripting language? By an object?)
Column Returns the column position within the file that generated the error
Description Returns a short description of the error
File Returns the name of the ASP file that generated the error
Line Returns the line number where the error was detected
Number Returns the standard COM error code for the error
Source Returns the actual source code of the line where the error occurred