This is the mail archive of the java-patches@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: gnu.gcj.runtime.StackTrace.findCallerClass()


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/





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