Third party JavaScript - good idea to use try catch?
<p>I am developing a third party JavaScript widget that will be included by users on their applications/blogs. I have good tests around the library, but I am afraid that if despite that if some syntax error sneaks through and cause the other scripts on the user's application to stop loading. </p>

<p>So - to prevent this from happening, is it a good idea to surround my entire widget code in a try/catch like this?</p>

<pre><code>try {
    // my library
} catch(e) {
    // notify me about the error
}
</code></pre>
