title: Handling errors in jQuery(document).ready
body: <p>I'm developing JS that is used in a web framework, and is frequently mixed in with other developers' (often error-prone) jQuery code. Unfortunately errors in their jQuery(document).ready blocks prevent mine from executing. Take the following simple sample:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      jQuery(document).ready(function() {
          nosuchobject.fakemethod();       //intentionally cause major error
      });
  &lt;/script&gt;
  &lt;script type="text/javascript"&gt;
      jQuery(document).ready(function() {
          alert("Hello!");                 //never executed
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>Shouldn't the second ready block execute regardless of what happened in the previous? Is there a "safe" way to run jQuery(document).ready that will run even in the case of previous errors?</p>
  
  <p>EDIT: I have no control/visibility over the error-prone blocks as they're written by other authors and mixed in arbitrarily.</p>