Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A1FD011328 for ; Thu, 24 Apr 2014 11:45:36 +0000 (UTC) Received: (qmail 79932 invoked by uid 500); 24 Apr 2014 11:45:35 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 79862 invoked by uid 500); 24 Apr 2014 11:45:34 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 79855 invoked by uid 99); 24 Apr 2014 11:45:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Apr 2014 11:45:34 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Apr 2014 11:45:34 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id F403D23889EC; Thu, 24 Apr 2014 11:45:10 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@commons.apache.org From: ebourg@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140424114510.F403D23889EC@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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());