ASP Server.GetLastError() - Application Object Returns the previous exception.
ShotDev Focus:
- The previous exception that was thrown.
Example
asp_server_getlasterror.asp
<% Option Explicit %> <html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <% Dim objErr Set objErr = Server.GetLastError() Response.Write("<br>Error Code = " & objErr.ASPCode) Response.Write("<br>Error Description = " & objErr.ASPDescription) Response.Write("<br>Category = " & objErr.Category) Response.Write("<br>Column = " & objErr.Column) Response.Write("<br>Description = " & objErr.Description) Response.Write("<br>File = " & objErr.File) Response.Write("<br>Line = " & objErr.Line) Response.Write("<br>Number = " & objErr.Number) Response.Write("<br>Source = " & objErr.Source) %> </body> </html>
Create a asp file and save to path root-path/myasp/
Run