Fix bugs with unhandled exception handling.

Safari and IE stop on these lines because of some weird behaviour.

http://stackoverflow.com/questions/15145108/running-jquery-crashing-on-ie10-win7

http://bugs.jquery.com/ticket/13881

![screen shot 2013-07-19 at 12 49 52](https://f.cloud.github.com/assets/574696/825032/e0373b52-f058-11e2-9857-75b3f0991f2b.png)