gnu.gcj.runtime.StackTrace.findCallerClass()

Mohan Embar gnustuff@thisiscool.com
Wed Sep 10 02:31:00 GMT 2003


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/






More information about the Java-patches mailing list