commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ebo...@apache.org
Subject svn commit: r1589679 - /commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/InstConstraintVisitor.java
Date Thu, 24 Apr 2014 11:45:10 GMT
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());



Mime
View raw message