function fc(a) {
try {
a()
} catch (b) {
setTimeout(function () {
throw b;
}, 0)
}
};
I'm grasping at straws here..
It is possible the intention was to make the exception uncatchable, suggesting the authors felt it is inappropriate to attempt to recover from the problem.
~Ryan
--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/aa264ab4-abda-4031-b7ec-92b2c34d80ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You typically see code like this in streaming parsers, where you want to do all of the processing for a chunk of data before emitting any errors so as not to lose your place in the stream (node-redis does something very similar). I also believe (although I’m not entirely sure) that most of the Firebase API is meant to be used in both the browser and on the server, so the code in question is probably making few assumptions about how the errors are going to be handled (or whether there’s a mechanism like process.nextTick or Node’s (soon-to-be deprecated) domains available). It’s not the most pleasant pattern to encounter as an API user, but generic JavaScript is pretty poor at supporting async error handling, so that’s what you get.
F
--