Displaying error line number

Reply

Join Date: Sep 2004
Posts: 1
Reputation: robertdavies is an unknown quantity at this point 
Solved Threads: 0
robertdavies robertdavies is offline Offline
Newbie Poster

Displaying error line number

 
0
  #1
Sep 29th, 2004
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
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 10
Reputation: Cyber-SEO is an unknown quantity at this point 
Solved Threads: 0
Cyber-SEO Cyber-SEO is offline Offline
Newbie Poster

Re: Displaying error line number

 
0
  #2
Sep 29th, 2004
I have tried the same exact thing. I was never able to get the line number to come up.
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 166
Reputation: Lafinboy is an unknown quantity at this point 
Solved Threads: 7
Lafinboy's Avatar
Lafinboy Lafinboy is offline Offline
Junior Poster

Re: Displaying error line number

 
0
  #3
Sep 29th, 2004
The syntax for returning the line number of the ASP error using the GetLastError object is :

  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.
If I've been a help please confirm by clicking the Add to Lafinboy's Reputation link in the header of this reply.

Lafinboy Productions
:: Website Design :: Website Development ::

Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC