cjohansen/Sinon.JS — pull request #50 by felixge (2011-11-09 17:40:59+00:00)
Title: Fix: Fake timers were swallowing exceptions

I promised to submit a patch for this a long time ago ... but now that we have met here at oredev, and I can no longer hide behind the internetz, I figured I should finally live up to my promise : ).

Let me know if the patch looks good to you - all tests of the node suite are passing when running them.

Currently clock.tick() was executing fake timer callbacks inside a
try...catch block which would silently swallow any exceptions which
may occur in the callback.

This patch changes this behavior to re-throw any exception that might
occur. If there are multiple timer callbacks to be executed, and there
are multiple exceptions, only the first one will be thrown, but all
timers will be executed.

Fixes #27