This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: The cost of stack traces


I do handle the exceptions, but in some programs I don't need to log or debug
them at all...

You are saying that, if I never call printStackTrace(), the line numbers won't
be decoded and I won't suffer the performance loss you guys are talking about?


Citando David Daney <ddaney@avtrex.com>:

> gabriel.bianco@pixeon.com.br wrote:
> > I actually don't need stack traces at all in some of my programs... What do
> I
> > need to do to disable it completely?
> > 
> 
> You cannot disable generation of stack traces.
> 
> You can disable their display and decoding of line numbers by wrapping 
> your code in a try{}catch(){} block and ignoring all Throwables. 
> However, in my mind this would be bad programming style, but that's just me.
> 
> David Daney.
> 
> 




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]