Sun
ONE Active Server Pages Product Home Page Developer Site Version
 

ContentsPreviousNextIndex



ASPError Object Example


The following example illustrates information exposed by the ASPServer object:

<%
'The following line of code will give an error
Set Application("objFso") = Server.CreateObject("")
   
'Call the GetLastError() method to trap the error
set objErr=Server.GetLastError()
   
Response.Write("ASP Code=" & objErr.ASPCode & "<br>")
Response.Write("Number=" & objErr.Number & "<br>")
Response.Write("Source=" & objErr.Source & "<br>")
Response.Write("Category=" & objErr.Category & "<br>")
Response.Write("File=" & objErr.File & "<br>")
Response.Write("Line=" & objErr.Line & "<br>")
Response.Write("Column=" & objErr.Column & "<br>")
Response.Write("Description=" & objErr.Description & "<br>")
Response.Write("ASPDescription=" & objErr.ASPDescription & "<br>")
%>


ContentsPreviousNextIndex