I am just starting out on ASP and was trying to raise an Error and retrieve info about the error by making a call to the GetLastError function of the Server class, but instead what I get is the plain vanilla IE error reporting (see attachment for a picture of what my IE looks like when I run my code). Here's my code:
Do I have to configure IIS to trap errors or something? I am using IE5 which I believe implements the ASPError object.Code:<%@ Language=VBScript%> <HTML> <% dim objErr Dim a a=5/0 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) %> </HTML>




Reply With Quote