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/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace DefaultWorkspace.java
Date Sun, 08 Jul 2001 07:26:44 GMT
donaldp     01/07/08 00:26:44

  Modified:    proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace
                        DefaultWorkspace.java
  Log:
  Update to reflect that that evaluate throws ContextException instead of TaskException.
  
  Revision  Changes    Path
  1.4       +13 -4     jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultWorkspace.java
  
  Index: DefaultWorkspace.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultWorkspace.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DefaultWorkspace.java	2001/06/29 08:58:40	1.3
  +++ DefaultWorkspace.java	2001/07/08 07:26:44	1.4
  @@ -14,6 +14,7 @@
   import java.util.Map;
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.activity.Initializable;
  +import org.apache.avalon.framework.context.ContextException;
   import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.component.Composable;
  @@ -380,11 +381,19 @@
           final Condition condition = target.getCondition();
           if( null != condition )
           {
  -            if( false == condition.evaluate( frame.getContext() ) )
  +            try
  +            {
  +                if( false == condition.evaluate( frame.getContext() ) )
  +                {
  +                    getLogger().debug( "Skipping target " + name +
  +                                       " as it does not satisfy condition" );
  +                    return;
  +                }
  +            }
  +            catch( final ContextException ce )
               {
  -                getLogger().debug( "Skipping target " + name +
  -                                   " as it does not satisfy condition" );
  -                return;
  +                throw new TaskException( "Error evaluating Condition for target " + 
  +                                         name, ce );
               }
           }
   
  
  
  

Mime
View raw message