Author: ebourg
Date: Thu Apr 24 11:45:10 2014
New Revision: 1589679

URL: http://svn.apache.org/r1589679
Log:
Improved the message of the AssertionViolatedExceptions thrown by 
InstConstraintVisitor when a field is not found

Modified:
    
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/InstConstraintVisitor.java

Modified: 
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/InstConstraintVisitor.java
URL: 
http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/InstConstraintVisitor.java?rev=1589679&r1=1589678&r2=1589679&view=diff
==============================================================================
--- 
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/InstConstraintVisitor.java
 (original)
+++ 
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/InstConstraintVisitor.java
 Thu Apr 24 11:45:10 2014
@@ -1270,7 +1270,7 @@ public class InstConstraintVisitor exten
                 }
             }
                        if (f == null) {
-                throw new AssertionViolatedException("Field '"+field_name+"' 
not found?!?");
+                throw new AssertionViolatedException("Field '" + field_name + 
"' not found in " + jc.getClassName());
             }
                }
 
@@ -2653,8 +2653,8 @@ public class InstConstraintVisitor exten
                        }
                }
                if (f == null){
-                       throw new AssertionViolatedException("Field not 
found?!?");
-               }
+            throw new AssertionViolatedException("Field '" + field_name + "' 
not found in " + jc.getClassName());
+        }
 
                Type value = stack().peek();
                Type t = Type.getType(f.getSignature());
@@ -2743,7 +2743,7 @@ public class InstConstraintVisitor exten
                        }
                }
                if (f == null){
-                       throw new AssertionViolatedException("Field not 
found?!?");
+            throw new AssertionViolatedException("Field '" + field_name + "' 
not found in " + jc.getClassName());
                }
                Type value = stack().peek();
                Type t = Type.getType(f.getSignature());


Reply via email to