Exception handling... Getting useful information.

  • Thread starter Thread starter Mufasa
  • Start date Start date
M

Mufasa

I'm trying to modify my exception handler to give me as much useful
information as possible. One of the thigs I would like to know is where in
the code the error actually happened. I can print out the Diagnostic Stack
but that doesn't tell me what line caused the problem. I'm generally doing
this for the type Exception because I don't know what all errors will
happen.

Anybody have any thoughts?

TIA - Jeff.
 
Mufasa said:
I'm trying to modify my exception handler to give me as much useful
information as possible. One of the thigs I would like to know is where in
the code the error actually happened. I can print out the Diagnostic Stack
but that doesn't tell me what line caused the problem.

Then you're missing .PDB files, or the assemblies you built do not contain
full debug information. By default, release builds produce only files with
partial symbol information (enough to determine the file name but not the
line number). You can change this in the build options, hidden away behind
the "Advanced" button. There's nothing you can do in the handler itself to
fix this.

Generally, you can only diagnose debug builds this way. Release builds have
to rely on a proper exception handling strategy to convey enough information.
 
Back
Top