Return-Path: X-Original-To: apmail-zest-commits-archive@minotaur.apache.org Delivered-To: apmail-zest-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 5697317A4E for ; Tue, 9 Jun 2015 23:58:00 +0000 (UTC) Received: (qmail 81942 invoked by uid 500); 9 Jun 2015 23:58:00 -0000 Delivered-To: apmail-zest-commits-archive@zest.apache.org Received: (qmail 81892 invoked by uid 500); 9 Jun 2015 23:58:00 -0000 Mailing-List: contact commits-help@zest.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zest.apache.org Delivered-To: mailing list commits@zest.apache.org Received: (qmail 81702 invoked by uid 99); 9 Jun 2015 23:57:59 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jun 2015 23:57:59 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C22A3E0332; Tue, 9 Jun 2015 23:57:59 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: niclas@apache.org To: commits@zest.apache.org Date: Tue, 09 Jun 2015 23:58:08 -0000 Message-Id: <994ad4dca87148f08359bf57b268a34d@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [10/14] zest-qi4j git commit: Better error message when Mixin is missing. Better error message when Mixin is missing. Project: http://git-wip-us.apache.org/repos/asf/zest-qi4j/repo Commit: http://git-wip-us.apache.org/repos/asf/zest-qi4j/commit/4214bb49 Tree: http://git-wip-us.apache.org/repos/asf/zest-qi4j/tree/4214bb49 Diff: http://git-wip-us.apache.org/repos/asf/zest-qi4j/diff/4214bb49 Branch: refs/heads/develop Commit: 4214bb49ad30b4d893dcea00f70798f99cef875b Parents: e4b725a Author: Niclas Hedhman Authored: Wed Jun 3 16:59:03 2015 +0800 Committer: Niclas Hedhman Committed: Wed Jun 3 16:59:03 2015 +0800 ---------------------------------------------------------------------- .../main/java/org/qi4j/runtime/composite/CompositeModel.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/4214bb49/core/runtime/src/main/java/org/qi4j/runtime/composite/CompositeModel.java ---------------------------------------------------------------------- diff --git a/core/runtime/src/main/java/org/qi4j/runtime/composite/CompositeModel.java b/core/runtime/src/main/java/org/qi4j/runtime/composite/CompositeModel.java index c689929..9e18bf7 100644 --- a/core/runtime/src/main/java/org/qi4j/runtime/composite/CompositeModel.java +++ b/core/runtime/src/main/java/org/qi4j/runtime/composite/CompositeModel.java @@ -108,7 +108,7 @@ public abstract class CompositeModel } @Override - @SuppressWarnings( {"raw", "unchecked"} ) + @SuppressWarnings( { "raw", "unchecked" } ) public Class primaryType() { Class primaryType = null; @@ -159,7 +159,7 @@ public abstract class CompositeModel return visitor.visitLeave( this ); } - @SuppressWarnings( {"raw", "unchecked"} ) + @SuppressWarnings( { "raw", "unchecked" } ) private void createProxyClass() { Class mainType = first( types ); @@ -246,7 +246,8 @@ public abstract class CompositeModel // if (!matchesAny( isAssignableFrom( mixinType ), types )) if( !mixinsModel.isImplemented( mixinType ) ) { - throw new IllegalArgumentException( "Composite does not implement type " + mixinType.getName() ); + String message = "Composite " + primaryType().getName() + " does not implement type " + mixinType.getName(); + throw new IllegalArgumentException( message ); } // Instantiate proxy for given mixin interface