Author: stevel Date: Thu Nov 22 04:43:25 2007 New Revision: 597397 URL: http://svn.apache.org/viewvc?rev=597397&view=rev Log: Bug 43936: <fixcrlf> errors are unhelpful
Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java?rev=597397&r1=597396&r2=597397&view=diff ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java Thu Nov 22 04:43:25 2007 @@ -83,9 +83,10 @@ public class FixCRLF extends MatchingTask implements ChainableReader { + private static final String FIXCRLF_ERROR = "<fixcrlf> error: "; /** error string for using srcdir and file */ public static final String ERROR_FILE_AND_SRCDIR - = "srcdir and file are mutually exclusive"; + =FIXCRLF_ERROR+"srcdir and file are mutually exclusive"; private static final FileUtils FILE_UTILS = FileUtils.getFileUtils(); @@ -106,6 +107,7 @@ */ private String outputEncoding = null; + /** * Chain this task as a reader. * @param rdr Reader to chain. @@ -312,20 +314,20 @@ srcDir = file.getParentFile(); } if (srcDir == null) { - throw new BuildException("srcdir attribute must be set!"); + throw new BuildException(FIXCRLF_ERROR +"srcdir attribute must be set!"); } if (!srcDir.exists()) { - throw new BuildException("srcdir does not exist!"); + throw new BuildException(FIXCRLF_ERROR +"srcdir does not exist: '"+srcDir+"'"); } if (!srcDir.isDirectory()) { - throw new BuildException("srcdir is not a directory!"); + throw new BuildException(FIXCRLF_ERROR +"srcdir is not a directory: '"+srcDir+"'"); } if (destDir != null) { if (!destDir.exists()) { - throw new BuildException("destdir does not exist!"); + throw new BuildException(FIXCRLF_ERROR +"destdir does not exist: '" + destDir + "'"); } if (!destDir.isDirectory()) { - throw new BuildException("destdir is not a directory!"); + throw new BuildException(FIXCRLF_ERROR +"destdir is not a directory: '" + destDir + "'"); } } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]