[e-lang] taming (Was: VirtualMachineError)

David Hopwood david.nospam.hopwood at blueyonder.co.uk
Thu Feb 1 19:42:05 CST 2007


Close, Tyler J. wrote:
> David Wagner wrote:
> 
>>For instance, here is one not-so-obvious but I think
>>minor issue: taming. With Alan's proposal, we have to
>>know that no Java class libraries will ever catch and
>>handle Error or any subtype thereof.
> 
> Good point. It looks like both java.lang.reflect.Method and
> java.lang.reflect.Constructor catch a thrown Error and wrap it in a
> java.lang.reflect.InvocationTargetException. I guess we'll have to
> extend the reflection API with a Joe-E wrapper that undoes this
> wrapping.

Another API that munges exceptions is java.lang.reflect.Proxy; see
<http://java.sun.com/j2se/1.5.0/docs/api/java/lang/reflect/UndeclaredThrowableException.html>,
although it happens not to affect subclasses of Error (or RuntimeException).

-- 
David Hopwood <david.nospam.hopwood at blueyonder.co.uk>



More information about the e-lang mailing list