Browse Source

Improve error reporting in <fixcrlf>

PR: 14061
Submitted by:	Jesse Glick <jesse.glick at netbeans.com>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273520 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 22 years ago
parent
commit
b905f0902c
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      src/main/org/apache/tools/ant/taskdefs/FixCRLF.java

+ 6
- 2
src/main/org/apache/tools/ant/taskdefs/FixCRLF.java View File

@@ -806,15 +806,18 @@ public class FixCRLF extends MatchingTask {
private BufferedReader reader;
private StringBuffer line = new StringBuffer();
private boolean reachedEof = false;
private File srcFile;

public OneLiner(File srcFile)
throws BuildException {
this.srcFile = srcFile;
try {
reader = new BufferedReader
(getReader(srcFile), INBUFLEN);
nextLine();
} catch (IOException e) {
throw new BuildException(e);
throw new BuildException(srcFile + ": "+ e.getMessage(),
e, getLocation());
}
}

@@ -898,7 +901,8 @@ public class FixCRLF extends MatchingTask {
} // end of if (eolcount == 0)

} catch (IOException e) {
throw new BuildException(e);
throw new BuildException(srcFile + ": "+ e.getMessage(),
e, getLocation());
}
}



Loading…
Cancel
Save