[Pkg-mozext-commits] [itsalltext] 146/459: More robust logging
David Prévot
taffit at moszumanska.debian.org
Tue Feb 24 23:26:15 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository itsalltext.
commit 77325d6b32d0070d9bdf3bc63dc79985a7a3ca37
Author: docwhat at gerf.org <docwhat at gerf.org>
Date: Thu Feb 22 09:40:41 2007 -0500
More robust logging
---
chrome/content/itsalltext.js | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/chrome/content/itsalltext.js b/chrome/content/itsalltext.js
index 5d88b43..8badac1 100644
--- a/chrome/content/itsalltext.js
+++ b/chrome/content/itsalltext.js
@@ -85,12 +85,16 @@ var ItsAllText = function() {
* @param {Object} message One or more objects can be passed in to display.
*/
that.log = function() {
- // idiom: Convert arguments to an array for easy handling.
var args = Array.prototype.slice.apply(arguments,[0]);
- var consoleService = Components.
- classes["@mozilla.org/consoleservice;1"].
- getService(Components.interfaces.nsIConsoleService);
- consoleService.logStringMessage("ItsAllText: " + args.join(' '));
+ try {
+ // idiom: Convert arguments to an array for easy handling.
+ var consoleService = Components.
+ classes["@mozilla.org/consoleservice;1"].
+ getService(Components.interfaces.nsIConsoleService);
+ consoleService.logStringMessage("ItsAllText: " + args.join(' '));
+ } catch(e) {
+ Components.utils.reportError(e+"\nmessage: "+args.join(' '));
+ }
};
/**
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/itsalltext.git
More information about the Pkg-mozext-commits
mailing list