From 167787a0a4901acaf09ed146c92d08b43a191b1f Mon Sep 17 00:00:00 2001 From: Peter Donald Date: Mon, 14 Jan 2002 09:02:23 +0000 Subject: [PATCH] Provide better error messages Submitted By: "Adam Murdoch" git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270754 13f79535-47bb-0310-9956-ffa450edef68 --- .../myrmidon/components/type/MultiSourceTypeFactory.java | 2 +- .../org/apache/myrmidon/components/type/Resources.properties | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/type/MultiSourceTypeFactory.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/type/MultiSourceTypeFactory.java index 8d111de5a..f0e5cd2e2 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/type/MultiSourceTypeFactory.java +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/type/MultiSourceTypeFactory.java @@ -81,7 +81,7 @@ public class MultiSourceTypeFactory if( !m_type.isInstance( object ) ) { - final String message = REZ.getString( "no-factory.error", name, m_type.getName() ); + final String message = REZ.getString( "mismatched-type.error", name, object.getClass().getName() ); throw new TypeException( message ); } diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/type/Resources.properties b/proposal/myrmidon/src/java/org/apache/myrmidon/components/type/Resources.properties index 3f8c84a85..a84a2069b 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/type/Resources.properties +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/type/Resources.properties @@ -1,5 +1,5 @@ no-instantiate.error=Unable to instantiate ({0}). -no-mapping.error=Malconfigured factory, no clasname for ({0}). +no-mapping.error=Malconfigured factory, no classname for ({0}). no-factory.error=Failed to locate factory for {0}. -bad-type.error=Object {0} is not of correct Type ({1}). +mismatched-type.error=Factory for type {0} created an object of incompatible type {1}. no-work-interface.error=Role {0} does not specify accessible work interface.