Author: niallp
Date: Mon Jan 7 07:14:48 2008
New Revision: 609633
URL: http://svn.apache.org/viewvc?rev=609633&view=rev
Log:
IO-77 improve error message
Modified:
commons/proper/io/trunk/src/java/org/apache/commons/io/FileUtils.java
Modified: commons/proper/io/trunk/src/java/org/apache/commons/io/FileUtils.java
URL:
http://svn.apache.org/viewvc/commons/proper/io/trunk/src/java/org/apache/commons/io/FileUtils.java?rev=609633&r1=609632&r2=609633&view=diff
==============================================================================
--- commons/proper/io/trunk/src/java/org/apache/commons/io/FileUtils.java
(original)
+++ commons/proper/io/trunk/src/java/org/apache/commons/io/FileUtils.java Mon
Jan 7 07:14:48 2008
@@ -1772,7 +1772,8 @@
destDir.mkdirs();
}
if (!destDir.exists()) {
- throw new IOException("Destination directory does not exist");
+ throw new FileNotFoundException("Destination directory '" +
destDir +
+ "' does not exist [createDestDir=" + createDestDir +"]");
}
if (!destDir.isDirectory()) {
throw new IOException("Destination '" + destDir + "' is not a
directory");
@@ -1846,7 +1847,8 @@
destDir.mkdirs();
}
if (!destDir.exists()) {
- throw new IOException("Destination directory does not exist");
+ throw new FileNotFoundException("Destination directory '" +
destDir +
+ "' does not exist [createDestDir=" + createDestDir +"]");
}
if (!destDir.isDirectory()) {
throw new IOException("Destination '" + destDir + "' is not a
directory");