Merge pull request #2633 from kaiwangchen/simulate_complete_exception_handler

Simulate a complete custom exception handler by redirecting uncaught events