Detect Unhandled Synchronous and Asynchronous Errors

This example must be hosted in a test web server or online, or some of its features will not work.

Look at the browser's console to see the result.