harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Archie Cobbs <arc...@dellroad.org>
Subject Re: [vmi] JNI spec interpretation?
Date Wed, 05 Apr 2006 14:15:57 GMT
Tim Ellison wrote:
> So what should a VM do if somebody calls ExceptionDescribe() and there
> is no pending exception?
> 
> (a) blow up
> (b) silently ignore it, since there is nothing to describe
> (c) print out something along the lines of 'no exception'

FWIW, here is what JCHEVM will do:

   If assertions enabled: assertion failure
   If assertions disabled: core dump with a segfault

> Since anyone can call the function at any time I'd argue that option (a)
> is not a good choice.

I disagree.. I prefer for things to be written with assertions, so that
when assertions are enabled we catch any suspicious behavior as soon as
possible, and when assertions are disabled, we assume "good behavior" and
can run as quickly as possible.

In this case, the spec seems to be clear that calling this function
when there is no exception pending is bogus, so that's why JCHEVM
behaves as it does.

-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message