-
Enhancement
-
Resolution: Won't Fix
-
P3
-
7
-
generic
-
generic
Currently if an exception is thrown out of a java.lang.instrument.ClassFileTransformer's transform method, the instrumentation agent considers this a bug in the transformer and for robustness purposes simply passes the original bytecodes to the virtual machine for definition. There are situations where it would be very useful to be able to cause that exception (such as a VerifyError, ClassFormatError, etc.) to be propagated to the caller of ClassLoader.defineClass(). Obviously the default behavior of the instrumentation agent can not be changed, but perhaps the Instrumentation APIs can be extended so that for a particular ClassFileTransformer, it can be selected whether to propagate exceptions out to the caller.