Author: dbrosius
Date: Sun Oct 18 00:56:28 2009
New Revision: 826323

URL: http://svn.apache.org/viewvc?rev=826323&view=rev
Log:
retain exception stack traces in the verifier

Modified:
    
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/exc/AssertionViolatedException.java
    
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/exc/ClassConstraintException.java
    
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/exc/VerificationException.java
    
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/exc/VerifierConstraintViolatedException.java
    
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java
    
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java
    
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/InstConstraintVisitor.java
    
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/LocalVariables.java
    
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/OperandStack.java
    
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Pass3bVerifier.java
    
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Subroutines.java

Modified: 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/exc/AssertionViolatedException.java
URL: 
http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/exc/AssertionViolatedException.java?rev=826323&r1=826322&r2=826323&view=diff
==============================================================================
--- 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/exc/AssertionViolatedException.java
 (original)
+++ 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/exc/AssertionViolatedException.java
 Sun Oct 18 00:56:28 2009
@@ -39,6 +39,13 @@
                super(message = "INTERNAL ERROR: "+message); // Thanks to Java, 
the constructor call here must be first.
                detailMessage=message;
        }
+       /**
+        * Constructs a new AssertionViolationException with the specified 
error message and initial cause
+        */
+       public AssertionViolatedException(String message, Throwable initCause) {
+               super(message = "INTERNAL ERROR: "+message, initCause);
+               detailMessage=message;
+       }       
        /** Extends the error message with a string before ("pre") and after 
("post") the
            'old' error message. All of these three strings are allowed to be 
null, and null
            is always replaced by the empty string (""). In particular, after 
invoking this

Modified: 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/exc/ClassConstraintException.java
URL: 
http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/exc/ClassConstraintException.java?rev=826323&r1=826322&r2=826323&view=diff
==============================================================================
--- 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/exc/ClassConstraintException.java
 (original)
+++ 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/exc/ClassConstraintException.java
 Sun Oct 18 00:56:28 2009
@@ -39,4 +39,11 @@
        public ClassConstraintException(String message){
                super (message);
        }
+       
+       /**
+        * Constructs a new ClassConstraintException with the specified error 
message and cause
+        */
+       public ClassConstraintException(String message, Throwable initCause){
+               super(message, initCause);
+       }
 }

Modified: 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/exc/VerificationException.java
URL: 
http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/exc/VerificationException.java?rev=826323&r1=826322&r2=826323&view=diff
==============================================================================
--- 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/exc/VerificationException.java
 (original)
+++ 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/exc/VerificationException.java
 Sun Oct 18 00:56:28 2009
@@ -42,4 +42,11 @@
        VerificationException(String message){
                super(message);
        }
+       
+       /**
+        * Constructs a new VerificationException with the specified error 
message and exception
+        */
+       VerificationException(String message, Throwable initCause){
+               super(message, initCause);
+       }
 }

Modified: 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/exc/VerifierConstraintViolatedException.java
URL: 
http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/exc/VerifierConstraintViolatedException.java?rev=826323&r1=826322&r2=826323&view=diff
==============================================================================
--- 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/exc/VerifierConstraintViolatedException.java
 (original)
+++ 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/exc/VerifierConstraintViolatedException.java
 Sun Oct 18 00:56:28 2009
@@ -47,6 +47,13 @@
                super(message); // Not that important
                detailMessage = message;
        }
+       /**
+        * Constructs a new VerifierConstraintViolationException with the 
specified error message and cause
+        */
+       VerifierConstraintViolatedException(String message, Throwable 
initCause){
+               super(message, initCause);
+               detailMessage = message;
+       }
 
 
        /** Extends the error message with a string before ("pre") and after 
("post") the

Modified: 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java
URL: 
http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java?rev=826323&r1=826322&r2=826323&view=diff
==============================================================================
--- 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java
 (original)
+++ 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java
 Sun Oct 18 00:56:28 2009
@@ -171,7 +171,7 @@
 
            } catch (ClassNotFoundException e) {
                // FIXME: this might not be the best way to handle missing 
classes.
-               throw new AssertionViolatedException("Missing class: " + 
e.toString());
+               throw new AssertionViolatedException("Missing class: " + 
e.toString(), e);
            }
        }
 
@@ -223,7 +223,7 @@
 
            } catch (ClassNotFoundException e) {
                // FIXME: this might not be the best way to handle missing 
classes.
-               throw new AssertionViolatedException("Missing class: " + 
e.toString());
+               throw new AssertionViolatedException("Missing class: " + 
e.toString(), e);
            }
        }
 
@@ -278,7 +278,7 @@
 
            } catch (ClassNotFoundException e) {
                // FIXME: this might not be the best way to handle missing 
classes.
-               throw new AssertionViolatedException("Missing class: " + 
e.toString());
+               throw new AssertionViolatedException("Missing class: " + 
e.toString(), e);
            }
 
        }
@@ -299,7 +299,7 @@
 
            } catch (ClassNotFoundException e) {
                // FIXME: this might not be the best way to handle missing 
classes.
-               throw new AssertionViolatedException("Missing class: " + 
e.toString());
+               throw new AssertionViolatedException("Missing class: " + 
e.toString(), e);
            }
        }
 
@@ -548,7 +548,7 @@
                                Type.getType(sig);  /* Don't need the return 
value */
                        }
                        catch (ClassFormatException cfe){
-                throw new ClassConstraintException("Illegal descriptor 
(==signature) '"+sig+"' used by '"+tostring(obj)+"'.");
+                throw new ClassConstraintException("Illegal descriptor 
(==signature) '"+sig+"' used by '"+tostring(obj)+"'.", cfe);
                        }
 
                        String nameanddesc = (name+sig);
@@ -597,7 +597,7 @@
                                ts = Type.getArgumentTypes(sig);
                        }
                        catch (ClassFormatException cfe){
-                throw new ClassConstraintException("Illegal descriptor 
(==signature) '"+sig+"' used by Method '"+tostring(obj)+"'.");
+                throw new ClassConstraintException("Illegal descriptor 
(==signature) '"+sig+"' used by Method '"+tostring(obj)+"'.", cfe);
                        }
 
                        // Check if referenced objects exist.
@@ -998,7 +998,7 @@
                                                        t = 
Type.getType(localsig);
                                                }
                                                catch (ClassFormatException 
cfe){
-                                                       throw new 
ClassConstraintException("Illegal descriptor (==signature) '"+localsig+"' used 
by LocalVariable '"+tostring(localvariables[i])+"' referenced by 
'"+tostring(lvt)+"'.");
+                                                       throw new 
ClassConstraintException("Illegal descriptor (==signature) '"+localsig+"' used 
by LocalVariable '"+tostring(localvariables[i])+"' referenced by 
'"+tostring(lvt)+"'.", cfe);
                                                }
                                                int localindex = 
localvariables[i].getIndex();
                                                if ( ( (t==Type.LONG || 
t==Type.DOUBLE)? localindex+1:localindex) >= code.getMaxLocals()){
@@ -1009,7 +1009,7 @@
                                                        
localVariablesInfos[method_number].add(localindex, localname, 
localvariables[i].getStartPC(), localvariables[i].getLength(), t);
                                                }
                                                
catch(LocalVariableInfoInconsistentException lviie){
-                                                       throw new 
ClassConstraintException("Conflicting information in LocalVariableTable 
'"+tostring(lvt)+"' found in Code attribute '"+tostring(obj)+"' (method 
'"+tostring(m)+"'). "+lviie.getMessage());
+                                                       throw new 
ClassConstraintException("Conflicting information in LocalVariableTable 
'"+tostring(lvt)+"' found in Code attribute '"+tostring(obj)+"' (method 
'"+tostring(m)+"'). "+lviie.getMessage(), lviie);
                                                }
                                        }// for all local variables 
localvariables[i] in the LocalVariableTable attribute atts[a] END
 
@@ -1022,7 +1022,7 @@
 
                    } catch (ClassNotFoundException e) {
                        // FIXME: this might not be the best way to handle 
missing classes.
-                       throw new AssertionViolatedException("Missing class: " 
+ e.toString());
+                       throw new AssertionViolatedException("Missing class: " 
+ e.toString(), e);
                    }
 
                }// visitCode(Code) END
@@ -1080,7 +1080,7 @@
 
                    } catch (ClassNotFoundException e) {
                        // FIXME: this might not be the best way to handle 
missing classes.
-                       throw new AssertionViolatedException("Missing class: " 
+ e.toString());
+                       throw new AssertionViolatedException("Missing class: " 
+ e.toString(), e);
                    }
                }
                // SYNTHETIC: see above
@@ -1170,7 +1170,7 @@
 
            } catch (ClassNotFoundException e) {
                // FIXME: this might not be the best way to handle missing 
classes.
-               throw new AssertionViolatedException("Missing class: " + 
e.toString());
+               throw new AssertionViolatedException("Missing class: " + 
e.toString(), e);
            }
        }
 
@@ -1213,7 +1213,7 @@
                                Type.getType(sig); /* Don't need the return 
value */
                        }
                        catch (ClassFormatException cfe){
-                               throw new ClassConstraintException("Illegal 
descriptor (==signature) '"+sig+"' used by '"+tostring(obj)+"'.");
+                               throw new ClassConstraintException("Illegal 
descriptor (==signature) '"+sig+"' used by '"+tostring(obj)+"'.", cfe);
                        }
                }
 
@@ -1244,7 +1244,7 @@
                                }
                        }
                        catch (ClassFormatException cfe){
-                               throw new ClassConstraintException("Illegal 
descriptor (==signature) '"+sig+"' used by '"+tostring(obj)+"'.");
+                               throw new ClassConstraintException("Illegal 
descriptor (==signature) '"+sig+"' used by '"+tostring(obj)+"'.", cfe);
                        }
                }
 
@@ -1275,7 +1275,7 @@
                                }
                        }
                        catch (ClassFormatException cfe){
-                               throw new ClassConstraintException("Illegal 
descriptor (==signature) '"+sig+"' used by '"+tostring(obj)+"'.");
+                               throw new ClassConstraintException("Illegal 
descriptor (==signature) '"+sig+"' used by '"+tostring(obj)+"'.", cfe);
                        }
 
                }
@@ -1327,7 +1327,7 @@
         * This method returns true if and only if the supplied String
         * represents a valid Java programming language method name stored as a 
simple
         * (non-qualified) name.
-        * Conforming to: The Java Virtual Machine Specification, Second 
Edition, §2.7, §2.7.1, §2.2.
+        * Conforming to: The Java Virtual Machine Specification, Second 
Edition, �2.7, �2.7.1, �2.2.
         */
        private static boolean validJavaLangMethodName(String name){
                if (!Character.isJavaIdentifierStart(name.charAt(0))) {

Modified: 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java
URL: 
http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java?rev=826323&r1=826322&r2=826323&view=diff
==============================================================================
--- 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java
 (original)
+++ 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java
 Sun Oct 18 00:56:28 2009
@@ -210,7 +210,7 @@
                }
            } catch (ClassNotFoundException e) {
                // FIXME: maybe not the best way to handle this
-               throw new AssertionViolatedException("Missing class: " + 
e.toString());
+               throw new AssertionViolatedException("Missing class: " + 
e.toString(), e);
            }
        }
 
@@ -415,7 +415,7 @@
 
            } catch (ClassNotFoundException e) {
                // FIXME: maybe not the best way to handle this
-               throw new AssertionViolatedException("Missing class: " + 
e.toString());
+               throw new AssertionViolatedException("Missing class: " + 
e.toString(), e);
            }
        }
        
@@ -456,7 +456,7 @@
                        return 
Repository.lookupClass(myOwner.getClassName()).getMethods()[method_no].getCode().getMaxLocals();
                    } catch (ClassNotFoundException e) {
                        // FIXME: maybe not the best way to handle this
-                       throw new AssertionViolatedException("Missing class: " 
+ e.toString());
+                       throw new AssertionViolatedException("Missing class: " 
+ e.toString(), e);
                    }
                }
 
@@ -532,7 +532,7 @@
                                indexValid(o, o.getIndex()+1);
                        }
                        catch(StaticCodeInstructionOperandConstraintException 
e){
-                               throw new AssertionViolatedException("OOPS: 
Does not BCEL handle that? LDC2_W operand has a problem.");
+                               throw new AssertionViolatedException("OOPS: 
Does not BCEL handle that? LDC2_W operand has a problem.", e);
                        }
                }
 
@@ -605,7 +605,7 @@
                        }
                    } catch (ClassNotFoundException e) {
                        // FIXME: maybe not the best way to handle this
-                       throw new AssertionViolatedException("Missing class: " 
+ e.toString());
+                       throw new AssertionViolatedException("Missing class: " 
+ e.toString(), e);
                    }
                }       
 
@@ -998,7 +998,7 @@
                        }
                    } catch (ClassNotFoundException e) {
                        // FIXME: maybe not the best way to handle this
-                       throw new AssertionViolatedException("Missing class: " 
+ e.toString());
+                       throw new AssertionViolatedException("Missing class: " 
+ e.toString(), e);
                    }
                }
 
@@ -1024,7 +1024,7 @@
                        }
                    } catch (ClassNotFoundException e) {
                        // FIXME: maybe not the best way to handle this
-                       throw new AssertionViolatedException("Missing class: " 
+ e.toString());
+                       throw new AssertionViolatedException("Missing class: " 
+ e.toString(), e);
                    }
                }
 
@@ -1065,7 +1065,7 @@
                        }
                    } catch (ClassNotFoundException e) {
                        // FIXME: maybe not the best way to handle this
-                       throw new AssertionViolatedException("Missing class: " 
+ e.toString());
+                       throw new AssertionViolatedException("Missing class: " 
+ e.toString(), e);
                    }
                }
 
@@ -1129,7 +1129,7 @@
                        
                    } catch (ClassNotFoundException e) {
                        // FIXME: maybe not the best way to handle this
-                       throw new AssertionViolatedException("Missing class: " 
+ e.toString());
+                       throw new AssertionViolatedException("Missing class: " 
+ e.toString(), e);
                    }
                        
                }
@@ -1161,7 +1161,7 @@
                
                    } catch (ClassNotFoundException e) {
                        // FIXME: maybe not the best way to handle this
-                       throw new AssertionViolatedException("Missing class: " 
+ e.toString());
+                       throw new AssertionViolatedException("Missing class: " 
+ e.toString(), e);
                    }
                }
 
@@ -1194,7 +1194,7 @@
                                        
                    } catch (ClassNotFoundException e) {
                        // FIXME: maybe not the best way to handle this
-                       throw new AssertionViolatedException("Missing class: " 
+ e.toString());
+                       throw new AssertionViolatedException("Missing class: " 
+ e.toString(), e);
                    }
                }
 

Modified: 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/InstConstraintVisitor.java
URL: 
http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/InstConstraintVisitor.java?rev=826323&r1=826322&r2=826323&view=diff
==============================================================================
--- 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/InstConstraintVisitor.java
 (original)
+++ 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/InstConstraintVisitor.java
 Sun Oct 18 00:56:28 2009
@@ -471,7 +471,7 @@
                }
            } catch (ClassNotFoundException e) {
                // FIXME: maybe not the best way to handle this
-               throw new AssertionViolatedException("Missing class: " + 
e.toString());
+               throw new AssertionViolatedException("Missing class: " + 
e.toString(), e);
            }
        }
 
@@ -563,7 +563,7 @@
                }
            } catch (ClassNotFoundException e) {
                // FIXME: maybe not the best way to handle this
-               throw new AssertionViolatedException("Missing class: " + 
e.toString());
+               throw new AssertionViolatedException("Missing class: " + 
e.toString(), e);
            }
        }
 
@@ -655,7 +655,7 @@
                //      referenceTypeIsInitialized(o, (ReferenceType) 
objectref);
                //}
                // The unsigned indexbyte1 and indexbyte2 are used to construct 
an index into the runtime constant pool of the
-               // current class (§3.6), where the value of the index is 
(indexbyte1 << 8) | indexbyte2. The runtime constant
+               // current class (�3.6), where the value of the index is 
(indexbyte1 << 8) | indexbyte2. The runtime constant
                // pool item at the index must be a symbolic reference to a 
class, array, or interface type.
                Constant c = cpg.getConstant(o.getIndex());
                if (! (c instanceof ConstantClass)){
@@ -1236,7 +1236,7 @@
 
            } catch (ClassNotFoundException e) {
                // FIXME: maybe not the best way to handle this
-               throw new AssertionViolatedException("Missing class: " + 
e.toString());
+               throw new AssertionViolatedException("Missing class: " + 
e.toString(), e);
            }
        }
 
@@ -1638,7 +1638,7 @@
                //      referenceTypeIsInitialized(o, (ReferenceType) 
objectref);
                //}
                // The unsigned indexbyte1 and indexbyte2 are used to construct 
an index into the runtime constant pool of the
-               // current class (§3.6), where the value of the index is 
(indexbyte1 << 8) | indexbyte2. The runtime constant
+               // current class (�3.6), where the value of the index is 
(indexbyte1 << 8) | indexbyte2. The runtime constant
                // pool item at the index must be a symbolic reference to a 
class, array, or interface type.
                Constant c = cpg.getConstant(o.getIndex());
                if (! (c instanceof ConstantClass)){
@@ -1824,7 +1824,7 @@
                
            } catch (ClassNotFoundException e) {
                // FIXME: maybe not the best way to handle this
-               throw new AssertionViolatedException("Missing class: " + 
e.toString());
+               throw new AssertionViolatedException("Missing class: " + 
e.toString(), e);
            }
        }
 
@@ -1875,7 +1875,7 @@
                }
            } catch (ClassNotFoundException e) {
                // FIXME: maybe not the best way to handle this
-               throw new AssertionViolatedException("Missing class: " + 
e.toString());
+               throw new AssertionViolatedException("Missing class: " + 
e.toString(), e);
            }
        }
 
@@ -1952,7 +1952,7 @@
                }       
            } catch (ClassNotFoundException e) {
                // FIXME: maybe not the best way to handle this
-               throw new AssertionViolatedException("Missing class: " + 
e.toString());
+               throw new AssertionViolatedException("Missing class: " + 
e.toString(), e);
            }
        }
 
@@ -2557,7 +2557,7 @@
 
            } catch (ClassNotFoundException e) {
                // FIXME: maybe not the best way to handle this
-               throw new AssertionViolatedException("Missing class: " + 
e.toString());
+               throw new AssertionViolatedException("Missing class: " + 
e.toString(), e);
            }
        }
 
@@ -2621,7 +2621,7 @@
 
            } catch (ClassNotFoundException e) {
                // FIXME: maybe not the best way to handle this
-               throw new AssertionViolatedException("Missing class: " + 
e.toString());
+               throw new AssertionViolatedException("Missing class: " + 
e.toString(), e);
            }
        }
 

Modified: 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/LocalVariables.java
URL: 
http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/LocalVariables.java?rev=826323&r1=826322&r2=826323&view=diff
==============================================================================
--- 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/LocalVariables.java
 (original)
+++ 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/LocalVariables.java
 Sun Oct 18 00:56:28 2009
@@ -177,7 +177,7 @@
                }
            } catch (ClassNotFoundException e) {
                // FIXME: maybe not the best way to handle this
-               throw new AssertionViolatedException("Missing class: " + 
e.toString());
+               throw new AssertionViolatedException("Missing class: " + 
e.toString(), e);
            }
        }
 

Modified: 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/OperandStack.java
URL: 
http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/OperandStack.java?rev=826323&r1=826322&r2=826323&view=diff
==============================================================================
--- 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/OperandStack.java
 (original)
+++ 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/OperandStack.java
 Sun Oct 18 00:56:28 2009
@@ -244,7 +244,7 @@
                }
            } catch (ClassNotFoundException e) {
                // FIXME: maybe not the best way to handle this
-               throw new AssertionViolatedException("Missing class: " + 
e.toString());
+               throw new AssertionViolatedException("Missing class: " + 
e.toString(), e);
            }
        }
 

Modified: 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Pass3bVerifier.java
URL: 
http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Pass3bVerifier.java?rev=826323&r1=826322&r2=826323&view=diff
==============================================================================
--- 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Pass3bVerifier.java
 (original)
+++ 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Pass3bVerifier.java
 Sun Oct 18 00:56:28 2009
@@ -316,7 +316,7 @@
                        jc = Repository.lookupClass(myOwner.getClassName());
                } catch (ClassNotFoundException e) {
                        // FIXME: maybe not the best way to handle this
-                       throw new AssertionViolatedException("Missing class: " 
+ e.toString());
+                       throw new AssertionViolatedException("Missing class: " 
+ e.toString(), e);
                }
 
                ConstantPoolGen constantPoolGen = new 
ConstantPoolGen(jc.getConstantPool());
@@ -378,7 +378,7 @@
                        PrintWriter pw = new PrintWriter(sw);
                        re.printStackTrace(pw);
 
-                       throw new AssertionViolatedException("Some 
RuntimeException occured while verify()ing class '"+jc.getClassName()+"', 
method '"+methods[method_no]+"'. Original RuntimeException's stack 
trace:\n---\n"+sw+"---\n");
+                       throw new AssertionViolatedException("Some 
RuntimeException occured while verify()ing class '"+jc.getClassName()+"', 
method '"+methods[method_no]+"'. Original RuntimeException's stack 
trace:\n---\n"+sw+"---\n", re);
                }
                return VerificationResult.VR_OK;
        }

Modified: 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Subroutines.java
URL: 
http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Subroutines.java?rev=826323&r1=826322&r2=826323&view=diff
==============================================================================
--- 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Subroutines.java
 (original)
+++ 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Subroutines.java
 Sun Oct 18 00:56:28 2009
@@ -286,7 +286,7 @@
                                                }
                                        }
                                        catch(RuntimeException re){
-                                               throw new 
AssertionViolatedException("Oops. BCEL did not like NULL as a ConstantPoolGen 
object.");
+                                               throw new 
AssertionViolatedException("Oops. BCEL did not like NULL as a ConstantPoolGen 
object.", re);
                                        }
                                }
                        }



---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: bcel-dev-h...@jakarta.apache.org

Reply via email to