Created
January 16, 2014 18:23
-
-
Save toddrbryan/8460378 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# emit one error event if the sax parser fails. this is mostly a hack, but | |
# the sax parser isn't state of the art either. | |
err = false | |
@saxParser.onerror = (error) => | |
@saxParser.resume() #Added | |
if ! err | |
err = true | |
@emit "error", error | |
@saxParser.onend = () => @emit "end" #Added |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment