title: Catch exceptions in jQuery
body: <p>I have the following code:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function() {
  
          $("#Save").click(function() {
  
              $.post("url", {
                  "data": "data"
              }, function(data) {
                  alert(data);
              });
  
          });
  
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>I'm testing this script, and one of the tests I'm making is, I just close the asp.net web development server, and click the button.</p>
  
  <p>IE says "access denied" error, I want to catch any error that occurs here, and display a friendly message to the user in this case.</p>
  
  <p>I trying to use try/catch but didn't work...</p>
  
  <p>Any clue?</p>