pretty-error
Advanced tools
Comparing version 0.1.8 to 0.1.9
{ | ||
"name": "pretty-error", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "scripts/js/lib/PrettyError.js", |
@@ -276,3 +276,3 @@ # PrettyError | ||
Please note that this is a work in progress. | ||
Please note that this is a work in progress, so there are rough edges. I'll try to add features and fix reported bugs, but feel free to fork this project and make your own changes. | ||
@@ -279,0 +279,0 @@ #### P.S |
@@ -33,6 +33,6 @@ var ParsedError, PrettyError, RenderKid, array, defaultStyle, nodePaths, object, prop, _fn, _i, _len, _ref, _ref1, | ||
PrettyError.listen = function(cb) { | ||
PrettyError.start = function(cb) { | ||
var pe; | ||
pe = new self; | ||
pe.listen(cb); | ||
pe.start(cb); | ||
return pe; | ||
@@ -53,3 +53,3 @@ }; | ||
PrettyError.prototype.listen = function(cb) { | ||
PrettyError.prototype.start = function(cb) { | ||
process.on('uncaughtException', (function(_this) { | ||
@@ -301,3 +301,21 @@ return function(exc) { | ||
colon: ':', | ||
message: e.message | ||
message: (function() { | ||
var i, line, msg, ret, splitted, _i, _len; | ||
msg = String(e.message).trim(); | ||
if (!msg.match(/\n/)) { | ||
return msg; | ||
} | ||
splitted = msg.split("\n"); | ||
ret = []; | ||
for (i = _i = 0, _len = splitted.length; _i < _len; i = ++_i) { | ||
line = splitted[i]; | ||
ret.push(line); | ||
if (i < splitted.length - 1) { | ||
ret.push({ | ||
br: {} | ||
}); | ||
} | ||
} | ||
return ret; | ||
})() | ||
}; | ||
@@ -304,0 +322,0 @@ traceItems = []; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52653
884