This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Can i modify Stacktrace Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Can i modify Stacktrace" Watch "Can i modify Stacktrace" New topic

Can i modify Stacktrace

surendar prabu
Ranch Hand

Joined: Jul 24, 2006
Posts: 102
After i catch the Exception thrown, in the catch block, is there any way i could modify i.e; suppress some function calls at the bottom most level before printing using the printstacktace method.

Now i am printing mystacktrace into file. If i am printing the trace for execute method in struts Action class, there is a long trace printed before the call to execute method. Can i suppress that by call to some method.

Please help me.

Surendar Prabu

SCJP 1.4
Joanne Neal

Joined: Aug 05, 2005
Posts: 3742
Have a look at the setStacktrace method in the Throwable class.

I agree. Here's the link:
subject: Can i modify Stacktrace
It's not a secret anymore!