diff --git a/WHATSNEW b/WHATSNEW index c598d44857..cde56282db 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -43,6 +43,14 @@ Changes that could break older environments: updated to launch in a forked JVM so that the System.exit() call will not impact the JVM in which Ant process runs. +Other changes: +-------------- + + * has a new failOnError attirbute which, when + enabled, makes the task throw a BuildException for certain error + cases that will only be logged otherwise. + Github Pull Request #206 + Fixed bugs: ----------- diff --git a/manual/Tasks/replaceregexp.html b/manual/Tasks/replaceregexp.html index 5077fbcba2..2523e6a368 100644 --- a/manual/Tasks/replaceregexp.html +++ b/manual/Tasks/replaceregexp.html @@ -95,6 +95,15 @@

Parameters

1.8.0. No; defaults to false + + failonerror + Stop the build process if certain file operations fail.
+ For historical reasons the task swallows and logs certain + failure cases, enabling this option makes sure the exception + make the build fail instead. + since Ant 1.10.15 + No; defaults to false +

Examples

diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java b/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
index aca6d1ac68..61bcc67998 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
@@ -325,6 +325,7 @@ public void setPreserveLastModified(boolean b) {
      * If false, note errors but continue.
      *
      * @param failonerror true or false
+     * @since Ant 1.10.15
      */
     public void setFailOnError(boolean failonerror) {
         this.failonerror = failonerror;