how can i get classname and method name when an error occurs

H

Hans Hahn

Hi NG,
In cf there is no stacktrace in a raised exception For error logging
purposes it would be helpful to determine the class name and the method name
programatically. Does anyone have an useful idea to do this?

Thx
 
H

Hans Hahn

Hi Alex,

thx for your answer!
is there any support for this at design time?
we have written an log file component which loggs all unhandled exception.
one of its parameters is the classname and the method name where the
exception occurs.
e.g. CFShared.ExceptionManagement.ExceptionManager.Publish(ex,
"Business.FillContactPersonFunction", true);

it would be very comfortable and less error prone if we can get the class
and method name at design time automatically. do youu have any idea to solve
this problem?
 
D

Daniel Moth

You could write a VS add-in that at design time generates the necessary
code. If your next question is going to be "how", I suggest reading the
documentation and I am sure there are many online articles on the subject.
For support I would try in the vsnet.ide newsgroup (there may be a more
specialized one).

Cheers
Daniel
 

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

Top