Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@apache.org Received: (qmail 45137 invoked from network); 26 Feb 2002 23:21:16 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 26 Feb 2002 23:21:16 -0000 Received: (qmail 14975 invoked by uid 97); 26 Feb 2002 23:21:17 -0000 Delivered-To: qmlist-jakarta-archive-ant-dev@jakarta.apache.org Received: (qmail 14954 invoked by uid 97); 26 Feb 2002 23:21:17 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 14943 invoked by uid 97); 26 Feb 2002 23:21:17 -0000 Date: 26 Feb 2002 23:21:07 -0000 Message-ID: <20020226232107.89801.qmail@icarus.apache.org> From: adammurdoch@apache.org To: jakarta-ant-cvs@apache.org Subject: cvs commit: jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer Resources.properties X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N adammurdoch 02/02/26 15:21:07 Modified: proposal/myrmidon/src/java/org/apache/myrmidon/components/executor AspectAwareExecutor.java DefaultExecutor.java Resources.properties proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer Resources.properties Log: Error message tidy-ups. Revision Changes Path 1.19 +8 -7 jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/AspectAwareExecutor.java Index: AspectAwareExecutor.java =================================================================== RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/AspectAwareExecutor.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- AspectAwareExecutor.java 21 Feb 2002 11:06:40 -0000 1.18 +++ AspectAwareExecutor.java 26 Feb 2002 23:21:07 -0000 1.19 @@ -28,7 +28,7 @@ * the aspects helpers. * * @author Peter Donald - * @version $Revision: 1.18 $ $Date: 2002/02/21 11:06:40 $ + * @version $Revision: 1.19 $ $Date: 2002/02/26 23:21:07 $ */ public class AspectAwareExecutor extends DefaultExecutor @@ -78,23 +78,24 @@ Configuration taskModel = getAspectManager().preCreate( model ); taskModel = prepareAspects( taskModel ); - debug( "creating.notice" ); - final Task task = createTask( taskModel.getName(), frame ); + final String taskName = taskModel.getName(); + debug( "creating.notice", taskName ); + final Task task = createTask( taskName, frame ); getAspectManager().postCreate( task ); - debug( "logger.notice" ); + debug( "logger.notice", taskName ); final Logger logger = frame.getLogger(); getAspectManager().preLogEnabled( logger ); doLogEnabled( task, taskModel, logger ); - debug( "contextualizing.notice" ); + debug( "contextualizing.notice", taskName ); doContextualize( task, taskModel, frame.getContext() ); - debug( "configuring.notice" ); + debug( "configuring.notice", taskName ); getAspectManager().preConfigure( taskModel ); doConfigure( task, taskModel, frame.getContext() ); - debug( "executing.notice" ); + debug( "executing.notice", taskName ); getAspectManager().preExecute(); doExecute( taskModel, task ); getAspectManager().preDestroy(); 1.28 +25 -15 jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/DefaultExecutor.java Index: DefaultExecutor.java =================================================================== RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/DefaultExecutor.java,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- DefaultExecutor.java 25 Feb 2002 10:42:43 -0000 1.27 +++ DefaultExecutor.java 26 Feb 2002 23:21:07 -0000 1.28 @@ -29,7 +29,7 @@ * The basic executor that just executes the tasks. * * @author Peter Donald - * @version $Revision: 1.27 $ $Date: 2002/02/25 10:42:43 $ + * @version $Revision: 1.28 $ $Date: 2002/02/26 23:21:07 $ */ public class DefaultExecutor extends AbstractLogEnabled @@ -55,31 +55,35 @@ public void execute( final Configuration taskModel, final ExecutionFrame frame ) throws TaskException { - debug( "creating.notice" ); - final Task task = createTask( taskModel.getName(), frame ); + final String taskName = taskModel.getName(); + debug( "creating.notice", taskName ); + final Task task = createTask( taskName, frame ); - debug( "logger.notice" ); + debug( "logger.notice", taskName ); doLogEnabled( task, taskModel, frame.getLogger() ); - debug( "contextualizing.notice" ); + debug( "contextualizing.notice", taskName ); doContextualize( task, taskModel, frame.getContext() ); - debug( "configuring.notice" ); + debug( "configuring.notice", taskName ); doConfigure( task, taskModel, frame.getContext() ); - debug( "executing.notice" ); + debug( "executing.notice", taskName ); task.execute(); } - protected final void debug( final String key ) + protected final void debug( final String key, final String taskName ) { if( getLogger().isDebugEnabled() ) { - final String message = REZ.getString( key ); + final String message = REZ.getString( key, taskName ); getLogger().debug( message ); } } + /** + * Creates a task instance. + */ protected final Task createTask( final String name, final ExecutionFrame frame ) throws TaskException { @@ -95,6 +99,9 @@ } } + /** + * Configures a task instance. + */ protected final void doConfigure( final Task task, final Configuration taskModel, final TaskContext taskContext ) @@ -109,12 +116,14 @@ final String message = REZ.getString( "config.error", taskModel.getName(), - taskModel.getLocation(), - throwable.getMessage() ); + taskModel.getLocation() ); throw new TaskException( message, throwable ); } } + /** + * Sets the context for a task. + */ protected final void doContextualize( final Task task, final Configuration taskModel, final TaskContext context ) @@ -129,12 +138,14 @@ final String message = REZ.getString( "contextualize.error", taskModel.getName(), - taskModel.getLocation(), - throwable.getMessage() ); + taskModel.getLocation() ); throw new TaskException( message, throwable ); } } + /** + * Sets the logger for a task. + */ protected final void doLogEnabled( final Task task, final Configuration taskModel, final Logger logger ) @@ -151,8 +162,7 @@ final String message = REZ.getString( "logger.error", taskModel.getName(), - taskModel.getLocation(), - throwable.getMessage() ); + taskModel.getLocation() ); throw new TaskException( message, throwable ); } } 1.5 +9 -13 jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/Resources.properties Index: Resources.properties =================================================================== RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/Resources.properties,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Resources.properties 25 Jan 2002 11:21:57 -0000 1.4 +++ Resources.properties 26 Feb 2002 23:21:07 -0000 1.5 @@ -1,17 +1,13 @@ -creating.notice=Creating. -logger.notice=Setting Logger. -contextualizing.notice=Contextualizing. -configuring.notice=Configuring. -initializing.notice=Initializing. -executing.notice=Executing. -disposing.notice=Disposing. +creating.notice=Creating {0}. +logger.notice=Setting Logger {0}. +contextualizing.notice=Contextualizing {0}. +configuring.notice=Configuring {0}. +executing.notice=Executing {0}. -no-create.error=Unable to create task {0}. -config.error=Error configuring task {0} at {1} (Reason: {2}). -contextualize.error=Error contextualizing task {0} at {1} (Reason: {2}). -dispose.error=Error disposing task {0} at {1} (Reason: {2}). -init.error=Error initializing task {0} at {1} (Reason: {2}). -logger.error=Error setting logger for task {0} at {1} (Reason: {2}). +no-create.error=Could not create task "{0}". +config.error={1}: Could not configure task "{0}". +contextualize.error={1}: Could not set the context for task "{0}". +logger.error={1}: Could not set the logger for task "{0}". unused-settings.error=Unused aspect settings for namespace {0} (parameterCount={1} elementCount={2}). dispatch-settings.notice=Dispatching Aspect Settings to namespace {0} (parameterCount={1} elementCount={2}). 1.15 +3 -3 jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/Resources.properties Index: Resources.properties =================================================================== RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/Resources.properties,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- Resources.properties 25 Feb 2002 10:42:43 -0000 1.14 +++ Resources.properties 26 Feb 2002 23:21:07 -0000 1.15 @@ -9,11 +9,11 @@ must-be-element.error=This property must be configured using a nested element. too-many-values.error=Too many values for this property. no-complex-type.error=Can not get complex type for non-primitive type {0}. -no-such-attribute.error=Attribute "{1}" is not supported for element <{0}>. +no-such-attribute.error=Element <{0}> does not support attribute "{1}". bad-set-attribute.error=Could not set attribute "{1}" for element <{0}>. bad-set-class-attribute.error=Could not set attribute "{0}" for object of class {1}. -no-such-element.error=Nested <{1}> elements are not supported for element <{0}>. -no-content.error=Text content is not supported in element <{0}>. +no-such-element.error=Element <{0}> does not support nested <{1}> elements. +no-content.error=Element <{0} does not support text content. bad-set-content.error=Could not set text content for element <{0}>. typed-adder-non-interface.error=The typed adder for class "{0}" must have a single parameter that is an interface rather than {1} which defines a class. create-typed-object.error=Could not create an object of type "{0}" of class {1}. -- To unsubscribe, e-mail: For additional commands, e-mail: