Retrieving Class, Function and Procedure name; retrieving line number

  • Thread starter Thread starter Michel Vanderbeke
  • Start date Start date
M

Michel Vanderbeke

Hello,

While logging the errors in my program, I want to know in which class,
function or procedure they occured.
Is it possible to know the name of the class, function and / or procedure in
which the error was produced? Is it also possible to know at which line
number of the program the error occured?

Many thanks and greetings,

Michel
 
Hello,

While logging the errors in my program, I want to know in which class,
function or procedure they occured.
Is it possible to know the name of the class, function and / or procedure in
which the error was produced? Is it also possible to know at which line
number of the program the error occured?

Many thanks and greetings,

Michel

In debug mode this information is available - see your other post
where I talk about the try...catch statement. You can gather most of
this information from the stacktrace property of the exception object.
In release mode however, most of this information is gone, as the
application has been compiled into IL and your app as you know it no
longer exists. You should do some experimenting on your own to see the
changes in stacktrace et al when you are in release mode compared to
debug mode.

Thanks,

Seth Rowe
 
In debug mode this information is available - see your other post
where I talk about the try...catch statement. You can gather most of
this information from the stacktrace property of the exception object.
In release mode however, most of this information is gone, as the
application has been compiled into IL and your app as you know it no
longer exists. You should do some experimenting on your own to see the
changes in stacktrace et al when you are in release mode compared to
debug mode.

Thanks,

Seth Rowe

I should also add that you should group similar posts together into
one post. This allows much easy discussion and enables future users to
find information in the archive easier.

Thanks,

Seth Rowe
 
Back
Top