diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/BuildException.java b/proposal/myrmidon/src/main/org/apache/tools/ant/BuildException.java deleted file mode 100644 index 74304cb93..000000000 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/BuildException.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) The Apache Software Foundation. All rights reserved. - * - * This software is published under the terms of the Apache Software License - * version 1.1, a copy of which has been included with this distribution in - * the LICENSE file. - */ -package org.apache.tools.ant; - -import org.apache.myrmidon.api.TaskException; - -/** - * Signals an error condition during a build. - * - * @author James Duncan Davidson - */ -public class BuildException - extends TaskException -{ - /** - * Location in the build file where the exception occured - */ - private Location location = Location.UNKNOWN_LOCATION; - - /** - * Constructs an exception with the given descriptive message. - * - * @param msg Description of or information about the exception. - */ - public BuildException( String msg ) - { - super( msg ); - } - - /** - * Constructs an exception with the given message and exception as a root - * cause. - * - * @param msg Description of or information about the exception. - * @param cause Throwable that might have cause this one. - */ - public BuildException( String msg, Throwable cause ) - { - super( msg, cause ); - } - - /** - * Sets the file location where the error occured. - * - * @param location The new Location value - */ - public void setLocation( Location location ) - { - this.location = location; - } - - /** - * Returns the file location where the error occured. - * - * @return The Location value - */ - public Location getLocation() - { - return location; - } -} diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/DefaultLogger.java b/proposal/myrmidon/src/main/org/apache/tools/ant/DefaultLogger.java index 95506ec3f..05ebd2154 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/DefaultLogger.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/DefaultLogger.java @@ -9,6 +9,7 @@ package org.apache.tools.ant; import java.io.PrintStream; import org.apache.tools.ant.util.StringUtils; +import org.apache.myrmidon.api.TaskException; /** * Writes build event to a PrintStream. Currently, it only writes which targets @@ -118,13 +119,13 @@ public class DefaultLogger implements BuildLogger message.append( StringUtils.LINE_SEP ); if( Project.MSG_VERBOSE <= msgOutputLevel || - !( error instanceof BuildException ) ) + !( error instanceof TaskException ) ) { message.append( StringUtils.getStackTrace( error ) ); } else { - if( error instanceof BuildException ) + if( error instanceof TaskException ) { message.append( error.toString() ).append( StringUtils.LINE_SEP ); } diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/IntrospectionHelper.java b/proposal/myrmidon/src/main/org/apache/tools/ant/IntrospectionHelper.java index aa4f96286..dc6191fa5 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/IntrospectionHelper.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/IntrospectionHelper.java @@ -287,7 +287,7 @@ public class IntrospectionHelper implements BuildListener */ public void setAttribute( Project p, Object element, String attributeName, String value ) - throws BuildException + throws TaskException { AttributeSetter as = (AttributeSetter)attributeSetters.get( attributeName ); if( as == null ) diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/TaskAdapter.java b/proposal/myrmidon/src/main/org/apache/tools/ant/TaskAdapter.java index f803b1b73..c1238e84a 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/TaskAdapter.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/TaskAdapter.java @@ -25,7 +25,7 @@ public class TaskAdapter extends Task * Checks a class, whether it is suitable to be adapted by TaskAdapter. * Checks conditions only, which are additionally required for a tasks * adapted by TaskAdapter. Thus, this method should be called by {@link - * Project#checkTaskClass}. Throws a BuildException and logs as + * Project#checkTaskClass}. Throws a TaskException and logs as * Project.MSG_ERR for conditions, that will cause the task execution to * fail. Logs other suspicious conditions with Project.MSG_WARN. * @@ -76,10 +76,10 @@ public class TaskAdapter extends Task /** * Do the execution. * - * @exception BuildException Description of Exception + * @exception TaskException Description of Exception */ public void execute() - throws BuildException + throws TaskException { Method setProjectM = null; try @@ -101,7 +101,7 @@ public class TaskAdapter extends Task { log( "Error setting project in " + proxy.getClass(), Project.MSG_ERR ); - throw new BuildException( "Error", ex ); + throw new TaskException( "Error", ex ); } Method executeM = null; @@ -120,7 +120,7 @@ public class TaskAdapter extends Task catch( Exception ex ) { log( "Error in " + proxy.getClass(), Project.MSG_ERR ); - throw new BuildException( "Error", ex ); + throw new TaskException( "Error", ex ); } } diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Tstamp.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Tstamp.java index 630edc3e4..f0be5527c 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Tstamp.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Tstamp.java @@ -18,7 +18,6 @@ import java.util.StringTokenizer; import java.util.TimeZone; import java.util.Vector; import org.apache.myrmidon.api.TaskException; -import org.apache.tools.ant.Location; import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; import org.apache.tools.ant.types.EnumeratedAttribute; diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java index e3dc8d5a4..ae32e718f 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java @@ -12,7 +12,6 @@ import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import org.apache.myrmidon.api.TaskException; -import org.apache.tools.ant.Location; import org.apache.tools.ant.Project; import org.apache.tools.ant.taskdefs.Execute; import org.apache.tools.ant.taskdefs.Javac; diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java index ef240ca8d..5670f43a8 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java @@ -28,7 +28,6 @@ import org.apache.bcel.classfile.*; import org.apache.myrmidon.api.TaskException; import org.apache.tools.ant.AntClassLoader; import org.apache.tools.ant.DirectoryScanner; -import org.apache.tools.ant.Location; import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; import org.apache.tools.ant.types.FileSet; diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/BuildException.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/BuildException.java deleted file mode 100644 index 74304cb93..000000000 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/BuildException.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) The Apache Software Foundation. All rights reserved. - * - * This software is published under the terms of the Apache Software License - * version 1.1, a copy of which has been included with this distribution in - * the LICENSE file. - */ -package org.apache.tools.ant; - -import org.apache.myrmidon.api.TaskException; - -/** - * Signals an error condition during a build. - * - * @author James Duncan Davidson - */ -public class BuildException - extends TaskException -{ - /** - * Location in the build file where the exception occured - */ - private Location location = Location.UNKNOWN_LOCATION; - - /** - * Constructs an exception with the given descriptive message. - * - * @param msg Description of or information about the exception. - */ - public BuildException( String msg ) - { - super( msg ); - } - - /** - * Constructs an exception with the given message and exception as a root - * cause. - * - * @param msg Description of or information about the exception. - * @param cause Throwable that might have cause this one. - */ - public BuildException( String msg, Throwable cause ) - { - super( msg, cause ); - } - - /** - * Sets the file location where the error occured. - * - * @param location The new Location value - */ - public void setLocation( Location location ) - { - this.location = location; - } - - /** - * Returns the file location where the error occured. - * - * @return The Location value - */ - public Location getLocation() - { - return location; - } -} diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/DefaultLogger.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/DefaultLogger.java index 95506ec3f..05ebd2154 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/DefaultLogger.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/DefaultLogger.java @@ -9,6 +9,7 @@ package org.apache.tools.ant; import java.io.PrintStream; import org.apache.tools.ant.util.StringUtils; +import org.apache.myrmidon.api.TaskException; /** * Writes build event to a PrintStream. Currently, it only writes which targets @@ -118,13 +119,13 @@ public class DefaultLogger implements BuildLogger message.append( StringUtils.LINE_SEP ); if( Project.MSG_VERBOSE <= msgOutputLevel || - !( error instanceof BuildException ) ) + !( error instanceof TaskException ) ) { message.append( StringUtils.getStackTrace( error ) ); } else { - if( error instanceof BuildException ) + if( error instanceof TaskException ) { message.append( error.toString() ).append( StringUtils.LINE_SEP ); } diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/IntrospectionHelper.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/IntrospectionHelper.java index aa4f96286..dc6191fa5 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/IntrospectionHelper.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/IntrospectionHelper.java @@ -287,7 +287,7 @@ public class IntrospectionHelper implements BuildListener */ public void setAttribute( Project p, Object element, String attributeName, String value ) - throws BuildException + throws TaskException { AttributeSetter as = (AttributeSetter)attributeSetters.get( attributeName ); if( as == null ) diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/TaskAdapter.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/TaskAdapter.java index f803b1b73..c1238e84a 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/TaskAdapter.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/TaskAdapter.java @@ -25,7 +25,7 @@ public class TaskAdapter extends Task * Checks a class, whether it is suitable to be adapted by TaskAdapter. * Checks conditions only, which are additionally required for a tasks * adapted by TaskAdapter. Thus, this method should be called by {@link - * Project#checkTaskClass}. Throws a BuildException and logs as + * Project#checkTaskClass}. Throws a TaskException and logs as * Project.MSG_ERR for conditions, that will cause the task execution to * fail. Logs other suspicious conditions with Project.MSG_WARN. * @@ -76,10 +76,10 @@ public class TaskAdapter extends Task /** * Do the execution. * - * @exception BuildException Description of Exception + * @exception TaskException Description of Exception */ public void execute() - throws BuildException + throws TaskException { Method setProjectM = null; try @@ -101,7 +101,7 @@ public class TaskAdapter extends Task { log( "Error setting project in " + proxy.getClass(), Project.MSG_ERR ); - throw new BuildException( "Error", ex ); + throw new TaskException( "Error", ex ); } Method executeM = null; @@ -120,7 +120,7 @@ public class TaskAdapter extends Task catch( Exception ex ) { log( "Error in " + proxy.getClass(), Project.MSG_ERR ); - throw new BuildException( "Error", ex ); + throw new TaskException( "Error", ex ); } } diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Tstamp.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Tstamp.java index 630edc3e4..f0be5527c 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Tstamp.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Tstamp.java @@ -18,7 +18,6 @@ import java.util.StringTokenizer; import java.util.TimeZone; import java.util.Vector; import org.apache.myrmidon.api.TaskException; -import org.apache.tools.ant.Location; import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; import org.apache.tools.ant.types.EnumeratedAttribute; diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java index e3dc8d5a4..ae32e718f 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java @@ -12,7 +12,6 @@ import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import org.apache.myrmidon.api.TaskException; -import org.apache.tools.ant.Location; import org.apache.tools.ant.Project; import org.apache.tools.ant.taskdefs.Execute; import org.apache.tools.ant.taskdefs.Javac; diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java index ef240ca8d..5670f43a8 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java @@ -28,7 +28,6 @@ import org.apache.bcel.classfile.*; import org.apache.myrmidon.api.TaskException; import org.apache.tools.ant.AntClassLoader; import org.apache.tools.ant.DirectoryScanner; -import org.apache.tools.ant.Location; import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; import org.apache.tools.ant.types.FileSet;