ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/executor ExecutionFrame.java
Date Thu, 20 Jun 2002 07:12:02 GMT
donaldp     2002/06/20 00:12:02

  Modified:    container/src/java/org/apache/myrmidon/components/executor
                        DefaultExecutionFrame.java DefaultExecutor.java
               container/src/java/org/apache/myrmidon/components/workspace
                        DefaultTaskContext.java
               container/src/java/org/apache/myrmidon/interfaces/executor
                        ExecutionFrame.java
  Log:
  Made ExecutionFrame.lookup() throw a TaskException rather than a ServiceException
  
  Revision  Changes    Path
  1.15      +10 -3     jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/executor/DefaultExecutionFrame.java
  
  Index: DefaultExecutionFrame.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/executor/DefaultExecutionFrame.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- DefaultExecutionFrame.java	20 Jun 2002 06:00:59 -0000	1.14
  +++ DefaultExecutionFrame.java	20 Jun 2002 07:12:02 -0000	1.15
  @@ -70,9 +70,16 @@
        * Returns the service in frame.
        */
       public Object lookup( String role )
  -        throws ServiceException
  +        throws TaskException
       {
  -        return m_serviceManager.lookup( role );
  +        try
  +        {
  +            return m_serviceManager.lookup( role );
  +        }
  +        catch( final ServiceException se )
  +        {
  +            throw new TaskException( se.getMessage(), se );
  +        }
       }
   
       /**
  
  
  
  1.47      +2 -10     jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/executor/DefaultExecutor.java
  
  Index: DefaultExecutor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/executor/DefaultExecutor.java,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- DefaultExecutor.java	20 Jun 2002 06:00:59 -0000	1.46
  +++ DefaultExecutor.java	20 Jun 2002 07:12:02 -0000	1.47
  @@ -10,7 +10,6 @@
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  -import org.apache.avalon.framework.service.ServiceException;
   import org.apache.myrmidon.api.Task;
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.api.TaskException;
  @@ -87,14 +86,7 @@
       private TaskEventManager getTaskEventManager( final ExecutionFrame frame )
           throws TaskException
       {
  -        try
  -        {
  -            return (TaskEventManager)frame.lookup( TaskEventManager.ROLE );
  -        }
  -        catch( final ServiceException se )
  -        {
  -            throw new TaskException( se.getMessage(), se );
  -        }
  +        return (TaskEventManager)frame.lookup( TaskEventManager.ROLE );
       }
   
       /**
  
  
  
  1.57      +4 -16     jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java
  
  Index: DefaultTaskContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- DefaultTaskContext.java	20 Jun 2002 06:01:00 -0000	1.56
  +++ DefaultTaskContext.java	20 Jun 2002 07:12:02 -0000	1.57
  @@ -12,7 +12,6 @@
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.avalon.excalibur.io.FileUtil;
  -import org.apache.avalon.framework.service.ServiceException;
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.api.event.LogLevel;
  @@ -130,20 +129,9 @@
               return m_frame;
           }
   
  -        final String classname = clazz.getName();
  -        try
  -        {
  -            // Lookup the service by role name.  Note that this will chain
  -            // up to parent ServiceManagers (if any)
  -            return m_frame.lookup( classname );
  -        }
  -        catch( final ServiceException e )
  -        {
  -            // Not found
  -            final String message =
  -                REZ.getString( "bad-find-service.error", classname );
  -            throw new TaskException( message, e );
  -        }
  +        // Lookup the service by role name.  Note that this will chain
  +        // up to parent ServiceManagers (if any)
  +        return m_frame.lookup( clazz.getName() );
       }
   
       /**
  
  
  
  1.19      +2 -3      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/executor/ExecutionFrame.java
  
  Index: ExecutionFrame.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/executor/ExecutionFrame.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- ExecutionFrame.java	20 Jun 2002 06:01:00 -0000	1.18
  +++ ExecutionFrame.java	20 Jun 2002 07:12:02 -0000	1.19
  @@ -9,7 +9,6 @@
   
   import java.io.File;
   import org.apache.avalon.framework.service.ServiceManager;
  -import org.apache.avalon.framework.service.ServiceException;
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.interfaces.property.PropertyStore;
  @@ -57,7 +56,7 @@
        * Returns the service in frame.
        */
       Object lookup( String role )
  -        throws ServiceException;
  +        throws TaskException;
   
       /**
        * Create a {@link TaskContext} object for current frame.
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message