diff --git a/src/main/org/apache/tools/ant/helper/ProjectHelper2.java b/src/main/org/apache/tools/ant/helper/ProjectHelper2.java index 00d65aa00..5b5a498a9 100644 --- a/src/main/org/apache/tools/ant/helper/ProjectHelper2.java +++ b/src/main/org/apache/tools/ant/helper/ProjectHelper2.java @@ -268,11 +268,13 @@ public class ProjectHelper2 extends ProjectHelper { } catch (FileNotFoundException exc) { throw new BuildException(exc); } catch (UnsupportedEncodingException exc) { - throw new BuildException("Encoding of project file is invalid.", - exc); + throw new BuildException("Encoding of project file " + + buildFileName + " is invalid.", + exc); } catch (IOException exc) { - throw new BuildException("Error reading project file: " - + exc.getMessage(), exc); + throw new BuildException("Error reading project file " + + buildFileName + ": " + exc.getMessage(), + exc); } finally { if (inputStream != null) { try {