try/catch in FileAppender.remove(), sometimes that fails
authorDan Mills <thunder@mozilla.com>
Mon, 23 Feb 2009 16:55:41 -0800
changeset 45290 5ea0c320972d8c31746126144020c76dbe1f8f4e
parent 45289 2e124af8853d98ab1448878dd00612c0d6c4ceeb
child 45291 58997331e9197a46192e7d2bc86da5b34dd9270c
push idunknown
push userunknown
push dateunknown
try/catch in FileAppender.remove(), sometimes that fails
services/sync/modules/log4moz.js
--- a/services/sync/modules/log4moz.js
+++ b/services/sync/modules/log4moz.js
@@ -480,17 +480,21 @@ FileAppender.prototype = {
       this._fos.write(message, message.length);
     } catch(e) {
       dump("Error writing file:\n" + e);
     }
   },
 
   clear: function FApp_clear() {
     this.closeStream();
-    this._file.remove(false);
+    try {
+      this._file.remove(false);
+    } catch (e) {
+      // XXX do something?
+    }
   }
 };
 
 /*
  * RotatingFileAppender
  * Similar to FileAppender, but rotates logs when they become too large
  */