Skip to content

Commit

Permalink
Completed readme
Browse files Browse the repository at this point in the history
  • Loading branch information
AriaMinaei committed Jan 25, 2014
1 parent 25471fb commit b8c48d6
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ pe.removeAllFilters();

## State of the project

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.

#### P.S

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pretty-error",
"version": "0.1.8",
"version": "0.1.9",
"description": "",
"main": "scripts/js/lib/PrettyError.js",
"dependencies": {
Expand Down
26 changes: 22 additions & 4 deletions scripts/coffee/lib/PrettyError.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ module.exports = class PrettyError

defaultStyle()

@listen: (cb) ->
@start: (cb) ->

pe = new self

pe.listen cb
pe.start cb

pe

Expand All @@ -50,7 +50,7 @@ module.exports = class PrettyError

@_renderer.style @_style

listen: (cb) ->
start: (cb) ->

process.on 'uncaughtException', (exc) =>

Expand Down Expand Up @@ -288,7 +288,25 @@ module.exports = class PrettyError

colon: ':'

message: e.message
message: do ->

msg = String(e.message).trim()

return msg unless msg.match(/\n/)

splitted = msg.split "\n"

ret = []

for line, i in splitted

ret.push line

if i < splitted.length - 1

ret.push br: {}

ret

traceItems = []

Expand Down

0 comments on commit b8c48d6

Please sign in to comment.