Latest web development tutorials

ASP ASPError 對象的屬性

ASPError 對象參考手冊 完整的ASPError對象參考手冊

ASPCode

ASPCode 屬性返回由IIS 生成的錯誤代碼。

ASPDescription

ASPDescription 屬性返回錯誤的詳細描述。

Category

Category 屬性返回錯誤源(錯誤是由IIS 、腳本語言還是組件產生的?)

Column

Column 屬性返回產生錯誤的ASP 文件中的列位置。

Description

Description 屬性返回關於錯誤的簡要描述。

File

File 屬性返回產生錯誤的ASP 文件的名稱。

Line

Line 屬性返回產生錯誤的ASP 文件中的行位置。

Number

Number 屬性返回錯誤的標準COM 錯誤代碼。

Source

Source 屬性返回錯誤發生行的實際源代碼。

語法

ASPError.ASPCode()
ASPError.ASPDescription()
ASPError.Category()
ASPError.Column()
ASPError.Description()
ASPError.File()
ASPError.Line()
ASPError.Number()
ASPError.Source()

實例

<%
dim objErr
set objErr=Server.GetLastError()

response.write("ASPCode=" & objErr.ASPCode)
response.write("<br>")
response.write("ASPDescription=" & objErr.ASPDescription)
response.write("<br>")
response.write("Category=" & objErr.Category)
response.write("<br>")
response.write("Column=" & objErr.Column)
response.write("<br>")
response.write("Description=" & objErr.Description)
response.write("<br>")
response.write("File=" & objErr.File)
response.write("<br>")
response.write("Line=" & objErr.Line)
response.write("<br>")
response.write("Number=" & objErr.Number)
response.write("<br>")
response.write("Source=" & objErr.Source)
%>


ASPError 對象參考手冊 完整的ASPError對象參考手冊