You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by David kerber <dc...@verizon.net> on 2007/05/18 19:47:13 UTC

Error trapping

In my plain .java files, is there a way of programmatically grabbing 
what method is executing?  I already grab the class for logging in the 
catch block, but can I find the method without going through too many 
gyrations?  Currently, I just hard-code the method name in the text that 
I log along with the error message.

D



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Error trapping

Posted by David kerber <dc...@verizon.net>.
Joe Riopel wrote:
> Can't you grab that from the stack trace?
> http://java.sun.com/j2se/1.4.2/docs/api/java/lang/StackTraceElement.html
Looks like a possibility; I'll have to look into it.  Thanks for the 
suggestion.

D



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Error trapping

Posted by Joe Riopel <go...@gmail.com>.
Can't you grab that from the stack trace?
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/StackTraceElement.html

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org