944,134 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 15910
  • ASP RSS
Sep 29th, 2004
0

Displaying error line number

Expand Post »
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
robertdavies is offline Offline
1 posts
since Sep 2004
Sep 29th, 2004
0

Re: Displaying error line number

I have tried the same exact thing. I was never able to get the line number to come up.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Cyber-SEO is offline Offline
10 posts
since Sep 2004
Sep 29th, 2004
0

Re: Displaying error line number

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

ASP Syntax (Toggle Plain Text)
  1. set objError = Server.GetLastError()
  2. 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.
Reputation Points: 16
Solved Threads: 7
Junior Poster
Lafinboy is offline Offline
166 posts
since Jul 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: Time Formatting
Next Thread in ASP Forum Timeline: HELP -my Date code isnt working





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC