Exception handling

  • Thread starter Thread starter Igor
  • Start date Start date
I

Igor

How can I know, when I catch an exception, in which line exactly it occured?
Is it possible at all?
 
Hi Igor:

Look at the StackTrace property of the exception.
To get the most information from the stack trace, you'll want PDB
files available for you assemblies. (Project -> Properties ->
Configuration Properties -> Build -> Generate Debugging Information =
true).

HTH,
 
Hi,

This is only possible if you compile it in debug mode AND if you have the
..pdb file in the same directory than the .exe , if so you can use the
StackTrace property of the exception.

Cheers,
 
Back
Top