trap exceptions from the parser, but not ones thrown by event handlers #357

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

cxreg commented Dec 24, 2012

According to RedisClient.prototype.on_data, "Callbacks that throw exceptions will land in return_reply(), below.". Although this handling is now in try_callback, exceptions thrown by "reply" callbacks are being silenced by the try/catch in lib/parser/javascript.js. Allow those errors to be thrown to the right place.

@cxreg cxreg referenced this pull request Feb 18, 2013

Closed

Javascript parser swallows errors thrown in command callback #361

2 of 5 tasks complete
Contributor

DTrejo commented Feb 18, 2013

I think that many try-catches have a bigger perf impact than just one. Hopefully #361 will take care of this. Closing for now, as I'd like 361's approach to make it in (and of course I will run perf tests on it to make sure it's not slower).

Thank you cxreg,
D

@DTrejo DTrejo closed this Feb 18, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment