diff options
author | aclement <aclement> | 2011-05-19 23:23:46 +0000 |
---|---|---|
committer | aclement <aclement> | 2011-05-19 23:23:46 +0000 |
commit | fcc37e1bb28e8721e0a3e0dd17b1204e32cd9262 (patch) | |
tree | 703a502662e73180ff5a2b2e9b25e6c18e056927 | |
parent | 79bb70535251caee53b717cb122c9bf817c58079 (diff) | |
download | aspectj-fcc37e1bb28e8721e0a3e0dd17b1204e32cd9262.tar.gz aspectj-fcc37e1bb28e8721e0a3e0dd17b1204e32cd9262.zip |
extra diagnostics on bytecode problems
-rw-r--r-- | bcel-builder/src/org/aspectj/apache/bcel/generic/MethodGen.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bcel-builder/src/org/aspectj/apache/bcel/generic/MethodGen.java b/bcel-builder/src/org/aspectj/apache/bcel/generic/MethodGen.java index 94c42938f..59cf7397e 100644 --- a/bcel-builder/src/org/aspectj/apache/bcel/generic/MethodGen.java +++ b/bcel-builder/src/org/aspectj/apache/bcel/generic/MethodGen.java @@ -84,7 +84,7 @@ import org.aspectj.apache.bcel.classfile.annotation.RuntimeParamAnnos; * While generating code it may be necessary to insert NOP operations. You can use the `removeNOPs' method to get rid off them. The * resulting method object can be obtained via the `getMethod()' method. * - * @version $Id: MethodGen.java,v 1.16 2009/10/05 17:35:36 aclement Exp $ + * @version $Id: MethodGen.java,v 1.17 2011/05/19 23:23:46 aclement Exp $ * @author <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A> * @author <A HREF="http://www.vmeng.com/beard">Patrick C. Beard</A> [setMaxStack()] * @see InstructionList @@ -693,7 +693,12 @@ public class MethodGen extends FieldGenOrMethodGen { byte[] byte_code = null; if (il != null) { - byte_code = il.getByteCode(); + try { + byte_code = il.getByteCode(); + } catch (Exception e) { + throw new IllegalStateException("Unexpected problem whilst preparing bytecode for " + this.getClassName() + "." + + this.getName() + this.getSignature(), e); + } } LineNumberTable lnt = null; |