You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by st...@apache.org on 2007/11/22 18:05:53 UTC
svn commit: r597452 -
/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/testing/Funtest.java
Author: stevel
Date: Thu Nov 22 09:05:51 2007
New Revision: 597452
URL: http://svn.apache.org/viewvc?rev=597452&view=rev
Log:
bit of tuning
Modified:
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/testing/Funtest.java
Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/testing/Funtest.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/testing/Funtest.java?rev=597452&r1=597451&r2=597452&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/testing/Funtest.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/testing/Funtest.java Thu Nov 22 09:05:51 2007
@@ -165,6 +165,8 @@
/** {@value} */
public static final String SKIPPING_TESTS
= "Condition failed -skipping tests";
+ public static final String APPLICATION_EXCEPTION = "Application Exception";
+ public static final String TEARDOWN_EXCEPTION = "Teardown Exception";
/**
* Log if the definition is overriding something
@@ -355,6 +357,7 @@
/**
* Create a newly bound parallel instance with one child
* @param parallelTimeout timeout
+ * @param child task
* @return a bound and initialised parallel instance.
*/
private Parallel newParallel(long parallelTimeout, Task child) {
@@ -463,16 +466,7 @@
}
applicationException = worker.getBuildException();
- /**Now faults are analysed
- the priority is
- -testexceptions, except those indicating a build timeout when the application itself
- failed.
- (because often it is the application fault that is more interesting than the probe
- failure, which is usually triggered by the application not starting
- -application exceptions (above test timeout exceptions)
- -teardown exceptions -except when they are being ignored
- -any
- */
+ //Now faults are analysed
processExceptions();
}
@@ -502,9 +496,7 @@
if (taskException == null || taskException instanceof BuildTimeoutException) {
taskException = applicationException;
} else {
- log("Application Exception:" + applicationException.toString(),
- applicationException,
- Project.MSG_WARN);
+ ignoringThrowable(APPLICATION_EXCEPTION, applicationException);
}
}
@@ -514,9 +506,7 @@
taskException = teardownException;
} else {
//don't let the cleanup exception get in the way of any other failure
- log("teardown exception" + teardownException.toString(),
- teardownException,
- Project.MSG_WARN);
+ ignoringThrowable(TEARDOWN_EXCEPTION, teardownException);
}
}
@@ -535,5 +525,16 @@
if (taskException != null) {
throw taskException;
}
+ }
+
+ /**
+ * log that we are ignoring something rather than rethrowing it.
+ * @param type name of exception
+ * @param thrown what was thrown
+ */
+ protected void ignoringThrowable(String type, Throwable thrown) {
+ log(type + ": "+ thrown.toString(),
+ thrown,
+ Project.MSG_WARN);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org