Coloured warnings and errors under Node.js

This commit is contained in:
Jermolene
2014-10-21 19:30:27 +01:00
parent 9fedf38657
commit 5d600ce31b
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -121,7 +121,7 @@ $tw.utils.error = function(err) {
var errHeading = "Internal JavaScript Error",
promptMsg = "Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser";
// Log the error to the console
console.error(err);
console.error($tw.node ? "\x1b[1;31m" + err + "\x1b[0m" : err);
if($tw.browser && !$tw.node) {
// Display an error message to the user
var dm = $tw.utils.domMaker,