From 0e3229eb49859abf9016131228c195b2174d931f Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Tue, 24 Jun 2003 09:37:06 +0000 Subject: [PATCH] Fix error message when filtersfile is missing. PR: 20825 git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274697 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/types/FilterSet.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/org/apache/tools/ant/types/FilterSet.java b/src/main/org/apache/tools/ant/types/FilterSet.java index 64cefa549..b38ab48ff 100644 --- a/src/main/org/apache/tools/ant/types/FilterSet.java +++ b/src/main/org/apache/tools/ant/types/FilterSet.java @@ -288,6 +288,11 @@ public class FilterSet extends DataType implements Cloneable { throw tooManyAttributes(); } + if (!filtersFile.exists()) { + throw new BuildException("Could not read filters from file " + + filtersFile + " as it doesn't exist."); + } + if (filtersFile.isFile()) { log("Reading filters from " + filtersFile, Project.MSG_VERBOSE); FileInputStream in = null;