View Single Post
  #1 (permalink)  
Old November 30th, 2006, 11:51 AM
ef1196 ef1196 is offline
Authorized User
 
Join Date: Nov 2006
Location: , , USA.
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to ef1196
Default Error Reporting With Line Numbers

At work I have inherited an extremely large VB2k5 application and at times it generates errors that are difficult to track.

Due to the nature of the application reproducing errors after they happen is often not possible.

Within my Error Trap routine I am able to get the calling procedure/function by examining Ex.TargetSite.Name (Where EX is an EXCEPTION). In addition I obviously get the error message itself, but what I would like is the line number of the offending procedure/function.

I have examined Environment.StackTrace.ToString as a method of retrieving a line number, but it seems to point to the "catch" portion of the "try/catch" statement rather than where the error actually occurred.

Some websites I have visited suggest (but don't document well) that including the .pdb file with your application will allow your error trap routine to display line numbers.

All thoughts and possible solutions are appreciated in advance!






Best Regards,
Earl Francis
__________________


Best Regards,
Earl