Skip to content

Commit

Permalink
Do not throw exceptions, instead propagete them to the error value
Browse files Browse the repository at this point in the history
Closes #67
  • Loading branch information
Leonidas-from-XIV committed Feb 10, 2013
1 parent 483cfbb commit c9c8c9b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
6 changes: 1 addition & 5 deletions lib/xml2js.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions src/xml2js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,7 @@ class exports.Parser extends events.EventEmitter
try
@saxParser.write str.toString()
catch ex
if ex instanceof exports.ValidationError
@emit("error", ex.message)
else
throw ex
@emit("error", ex.message)

exports.parseString = (str, a, b) ->
# let's determine what we got as arguments
Expand Down

0 comments on commit c9c8c9b

Please sign in to comment.