Just wondering how does ExceptionHub http://www.exceptionhub.com/ track the javascript errors in the user's browser?
A:
You can learn by reading the code: http://js.exceptionhub.com/javascripts/eh.js
lowellk
2010-09-23 22:08:46
That doesn't look too useful. :)
casablanca
2010-09-23 22:22:54
Try this: http://jsexplorer.com/beautify/script?src=http://js.exceptionhub.com/javascripts/eh.js
lowellk
2010-09-28 22:40:14
A:
I haven't used this product before, but by looking at what they have to offer, here's my guess at how it works: the tracking script probably scans through the page on which it is installed and wraps all JavaScript code that it can find (for eg. inside <script>
tags or in handlers such as onclick
) in try-catch
blocks, and when an exception occurs, it gains control and does whatever it's supposed to do, eg. reporting the exception.
casablanca
2010-09-23 22:31:43