summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorportix <none@none>2012-11-03 12:44:13 +0100
committerportix <none@none>2012-11-03 12:44:13 +0100
commit7b83f6b1853abea9a9571e15c7433f3eff579c99 (patch)
tree72be20fcaf3d042de33a28699f35aeb57e1c54c3
parentcb00c6e6d113423a19bcd4d3c44ec04a615259cc (diff)
downloaddwb-7b83f6b1853abea9a9571e15c7433f3eff579c99.zip
Fixing debug message in provide
-rw-r--r--scripts/lib/dwb.js7
-rw-r--r--scripts/lib/io.js2
2 files changed, 6 insertions, 3 deletions
diff --git a/scripts/lib/dwb.js b/scripts/lib/dwb.js
index c81389c6..5f9f4940 100644
--- a/scripts/lib/dwb.js
+++ b/scripts/lib/dwb.js
@@ -4,7 +4,7 @@
var _callbacks = [];
var _initialized = false;
var _applyRequired = function(names, callback) {
- if (names == null)
+ if (names === null)
callback.call(this, _modules);
else {
var modules = [];
@@ -18,7 +18,10 @@
"provide" : {
value : function(name, module) {
if (_modules[name])
- io.debug("provide: Module " + name + " is already defined!");
+ io.debug({
+ error : new Error("provide: Module " + name + " is already defined!"),
+ offset : 1, arguments : arguments
+ });
else
_modules[name] = module;
}
diff --git a/scripts/lib/io.js b/scripts/lib/io.js
index ca011174..455fb891 100644
--- a/scripts/lib/io.js
+++ b/scripts/lib/io.js
@@ -43,7 +43,7 @@
message += prefixArguments + JSON.stringify(params.arguments);
var caller = String(params.arguments.callee.caller);
message += prefixCaller;
- message += prefixFunction;
+ message += prefixFunction + "\n";
message += caller.replace(regHasDwb, "$1").replace(/\n/gm, "\n ");
message += prefixFunction;
}