[Pkg-mozext-commits] [itsalltext] 148/459: I tried making the log reporting work better. Changed default make to check for narfs and versions
David Prévot
taffit at moszumanska.debian.org
Tue Feb 24 23:26:16 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 98f672ac34da4908f3598138cd718045ce558577
Author: docwhat at gerf.org <docwhat at gerf.org>
Date: Thu Feb 22 10:25:42 2007 -0500
I tried making the log reporting work better.
Changed default make to check for narfs and versions
---
Makefile | 4 ++--
chrome/content/cacheobj.js | 3 +--
chrome/content/itsalltext.js | 24 +++++++++++++++++++++---
3 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
index 7f1515d..bf0e5a6 100644
--- a/Makefile
+++ b/Makefile
@@ -40,8 +40,8 @@ else
Q = @
endif
-all: lint docs
- $(Q)echo Lints and Docs are done
+all: lint version_check narf
+ $(Q)echo "Source checks out"
.PHONY: release
release: lint version_check $(XPI_FILE)
diff --git a/chrome/content/cacheobj.js b/chrome/content/cacheobj.js
index 945058b..132fe7f 100644
--- a/chrome/content/cacheobj.js
+++ b/chrome/content/cacheobj.js
@@ -113,7 +113,6 @@ CacheObj.prototype.setExtension = function(ext) {
* @returns {String} the unique identifier.
*/
CacheObj.prototype.getNodeIdentifier = function(node) {
- ItsAllText.debug('getNodeIdentifier',node);
var id = node.getAttribute('id');
if (!id) {
var name = node.getAttribute('name');
@@ -368,7 +367,7 @@ CacheObj.prototype.addGumDrop = function() {
cache_object.adjust();
return; /*already done*/
}
- ItsAllText.debug('addGumDrop',cache_object);
+ ItsAllText.debug('addGumDrop()',cache_object.node_id,cache_object.uid);
var node = cache_object.node;
var doc = node.ownerDocument;
diff --git a/chrome/content/itsalltext.js b/chrome/content/itsalltext.js
index 8badac1..8c2311c 100644
--- a/chrome/content/itsalltext.js
+++ b/chrome/content/itsalltext.js
@@ -80,20 +80,38 @@ var ItsAllText = function() {
};
/**
+ * Create an error message from given arguments.
+ * @param {Object} message One or more objects to be made into strings...
+ */
+ that.logString = function() {
+ var args = Array.prototype.slice.apply(arguments,[0]);
+ for (var i=0; i<args.length; i++) {
+ try {
+ args[i] = args[i].toString();
+ } catch(e) {
+ Components.utils.reportError(e);
+ args[i] = 'toStringFailed';
+ }
+ }
+ args.unshift(that.MYSTRING+':');
+ return args.join(' ');
+ };
+
+ /**
* This is a handy debug message. I'll remove it or disable it when
* I release this.
* @param {Object} message One or more objects can be passed in to display.
*/
that.log = function() {
- var args = Array.prototype.slice.apply(arguments,[0]);
+ var message = that.logString.apply(that, arguments);
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(' '));
+ consoleService.logStringMessage(message);
} catch(e) {
- Components.utils.reportError(e+"\nmessage: "+args.join(' '));
+ Components.utils.reportError(message);
}
};
--
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