Skip to content

Instantly share code, notes, and snippets.

@aheckmann
Created October 5, 2011 18:05
Show Gist options
  • Save aheckmann/1265184 to your computer and use it in GitHub Desktop.
Save aheckmann/1265184 to your computer and use it in GitHub Desktop.
// Catch error and log
try {
// Parse the data as a reply object
reply = new MongoReply(parent, message);
} catch(err) {
var errObj = {err:"unparsable", bin:message, parseState:err};
server.logger.error("mongoreplyParserError", errObj);
return parent.emit("error", errObj);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment