…4 line function. Moved the function to utils
Apparently, calling the callback with an error will trigger an error anyway. Totally undocumented. So, this was actually calling double error emitting.
sax >= v0.6.0 can throw if a gzipped data stream containing certain characters gets written to the parser. This is a user error (to pipe gzipped data), but sometimes servers send gzipped data even when you've told them not to. So, we try to let the user handle this more gracefully.