[EMAIL PROTECTED] wrote:
+ public static boolean deleteQuietly(File file) {
+ if (file == null) {
+ return false;
+ }
+ try {
+ if (file.isDirectory()) {
+ cleanDirectory(file);
+ }
+ } catch (Throwable t) {
+ }
+
+ try {
+ return file.delete();
+ } catch (Throwable t) {
+ return false;
+ }
I think I would prefer catch(Exception) rather than catch(Throwable).
Hiding an OutOfMemoryError (and similar) is generally a Bad Idea. Is
there a specific use case for catching Throwable?
Stephen
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]