Browse Source

Update to reflect that that evaluate throws ContextException instead of TaskException.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269300 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 24 years ago
parent
commit
92712f7da3
1 changed files with 13 additions and 4 deletions
  1. +13
    -4
      proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultWorkspace.java

+ 13
- 4
proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultWorkspace.java View File

@@ -14,6 +14,7 @@ import java.util.Iterator;
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 @@ public class DefaultWorkspace
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 );
}
}



Loading…
Cancel
Save