commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r609395 - /commons/proper/io/trunk/src/java/org/apache/commons/io/FileUtils.java
Date Sun, 06 Jan 2008 20:33:37 GMT
Author: niallp
Date: Sun Jan  6 12:33:36 2008
New Revision: 609395

URL: http://svn.apache.org/viewvc?rev=609395&view=rev
Log:
IO-135 - change deleteQuietly() to catch Exception rather than Throwable as per Stephen's
comment on dev@:
"I think I would prefer catch(Exception) rather than catch(Throwable).Hiding an OutOfMemoryError
(and similar) is generally a Bad Idea."

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=609395&r1=609394&r2=609395&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 Sun Jan  6 12:33:36
2008
@@ -915,12 +915,12 @@
             if (file.isDirectory()) {
                 cleanDirectory(file);
             }
-        } catch (Throwable t) {
+        } catch (Exception e) {
         }
 
         try {
             return file.delete();
-        } catch (Throwable t) {
+        } catch (Exception e) {
             return false;
         }
     }



Mime
View raw message