Browse Source

PR: 21520

throw an exception if input file does not exist


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274958 13f79535-47bb-0310-9956-ffa450edef68
master
Antoine Levy-Lambert 22 years ago
parent
commit
1f9f28daf8
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java

+ 3
- 0
src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java View File

@@ -211,6 +211,9 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
throw new BuildException("no stylesheet specified", getLocation());
}

if (inFile != null && !inFile.exists()) {
throw new BuildException("input file " + inFile.toString() + " does not exist", getLocation());
}
try {
if (baseDir == null) {
baseDir = getProject().resolveFile(".");


Loading…
Cancel
Save