bahmutov / console-log-div

Clones console.log calls to a created div in the page. Great for demos and experiments.
http://glebbahmutov.com/console-log-div/test/index.html
95 stars 18 forks source link

Some errors is not showing when error is replicated #11

Closed luqmanrom closed 9 years ago

luqmanrom commented 9 years ago

screen shot 2015-02-03 at 4 08 19 pm

Some errors is not showing when it is replicated.

bahmutov commented 9 years ago

when you do throw new Error(); or a.apply you do not call console.error - it happens behind the scenes inside Chrome, so it is not possible to mirror these exceptions. Instead you can catch errors using window.onerror handler. This is much deeper topic and I would suggest using real time crash reporting service, like Sentry. Read my blog posts on catching errors http://bahmutov.calepin.co/tag/sentry.html

bahmutov commented 9 years ago

I added error event listener - should be enough to print any unhandled thrown Errors, check out v0.4.0

luqmanrom commented 9 years ago

Great! Good job!