0

Hi

I am creating some error trapping code that will email me when a error occurs in asp code. Alot of

the code works, except perhaps one of the most vital pieces of information line number of the error

I have tried

ASPError.Line

&

set objErr=Server.GetLastError()
objErr.Line

&

Err.Line

I get nothing returned or the object im looking at, or it is errorous. Im using IIS 6. Does anyone

have any ideas of how to get the line number of an error? You would think it would be a important

thing to be able to return and simple too.

Thanks in advance for any help
Rob

3
Contributors
2
Replies
3
Views
12 Years
Discussion Span
Last Post by Lafinboy
0

The syntax for returning the line number of the ASP error using the GetLastError object is :

set objError = Server.GetLastError()
strErrorLine =  objError.Line

Note though that you cannot use this in your standard asp application pages and expect it to work. You need to modify the default error page (500-100.asp) which handles ASP error reporting and displays the results on the screen. To get the error emailed to you you can replace this page with your own version which will display a custom message to the user and then email the error report to you.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.