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,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top