I've been reading about exceptions in the JVM spec and am confused
about what exceptions are asynchronous. Sec 2.16.4 states that
InternalError may be delivered asynchronously, but does not make this
claim for any other of the subclasses of VirtualMachineError. But sec
6.3 mentions that any subclass of VirtualMachineError may be thrown at
any time during the operation of the JVM. So are all subclasses of VME
asynchronous? And if not, what is the difference between InternalError
being raised asynchronously and OutOfMemoryError being raised at any
time?
Artur Biesiadowski - 06 Jan 2005 22:17 GMT
> I've been reading about exceptions in the JVM spec and am confused
> about what exceptions are asynchronous. Sec 2.16.4 states that
[quoted text clipped - 5 lines]
> being raised asynchronously and OutOfMemoryError being raised at any
> time?
My understanding is that 'throw at any time' means throwing at any
moment if error happened at this very moment. For example, you can throw
OOME at any bytecode which allocates memory directly or indirectly - but
you have to throw it before next bytecode is executed. On the other
hand, asynchronous throw can happen at any point in the future, possibly
even in different thread, from place which triggered the error itself.
It is just my idea how to interpret that - I'm in no way expert on the
subject.
Artur