bodewig 2002/11/08 06:59:46
Modified: src/main/org/apache/tools/ant/taskdefs FixCRLF.java
Log:
Improve error reporting in <fixcrlf>
PR: 14061
Submitted by: Jesse Glick <jesse.glick at netbeans.com>
Revision Changes Path
1.42 +7 -3
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java
Index: FixCRLF.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- FixCRLF.java 25 Jul 2002 15:21:04 -0000 1.41
+++ FixCRLF.java 8 Nov 2002 14:59:46 -0000 1.42
@@ -806,15 +806,18 @@
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 @@
} // end of if (eolcount == 0)
} catch (IOException e) {
- throw new BuildException(e);
+ throw new BuildException(srcFile + ": "+ e.getMessage(),
+ e, getLocation());
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>