1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-07 09:34:11 +01:00

Fix prefix in dump output.

This commit is contained in:
Kris Maglione
2010-12-29 15:09:29 -05:00
parent d2c8d0112f
commit 1504f4093f
2 changed files with 3 additions and 1 deletions

View File

@@ -167,7 +167,7 @@ defineModule.dump = function dump_() {
msg = util.objectToString(msg);
return msg;
}).join(", ");
let name = loaded.services && loaded.config ? config.name.name : "dactyl";
let name = loaded.config ? config.name : "dactyl";
dump(String.replace(msg, /\n?$/, "\n")
.replace(/^./gm, name + ": $&"));
}

View File

@@ -481,6 +481,8 @@ config.INIT = update(Object.create(config.INIT), config.INIT, {
}
});
endModule();
} catch(e){ if (isString(e)) e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); }
// vim: set fdm=marker sw=4 ts=4 et: