This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: gnu.gcj.runtime.StackTrace.findCallerClass()
- From: Mohan Embar <gnustuff at thisiscool dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: java-patches at gcc dot gnu dot org
- Date: Tue, 09 Sep 2003 19:21:02 -0500
- Subject: Re: gnu.gcj.runtime.StackTrace.findCallerClass()
- Reply-to: gnustuff at thisiscool dot com
Hi Andrew,
> > - know that you have to deal with both cases, and now be required to
> > introduce #ifdef HAVE_BACKTRACE in the caller's code too because there's
> > no other way to effectively deal with this.
> >
> > Even in the current case, the caller is always catching the
> > ArrayIndexOutOfBoundsException and never letting it trickle up to a higher
> > level.
>
>But that's wrong -- the caller shouldn't do that. The only reasonable
>thing to do if a caller isn't found in the stack is stop the entire
>JVM with a RuntimeError. Something has gone badly wrong.
Okay. But what is the caller supposed to do if HAVE_BACKTRACE
is not set? If we terminate the JVM if HAVE_BACKTRACE is set,
can't we call exit() instead of returning null if HAVE_BACKTRACE
is not set?
-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/