title: Exceptions thrown in jQuery AJAX callbacks swallowed?
body: <p>Is there any way to handle exceptions thrown from AJAX callbacks in jQuery, other than adding a try..catch block to each callback?  The error function is not called in this situation.</p>
  
  <pre><code>$.ajax(
  {
      url: 'myurl.rails',
      success: function( data )
      {
          throw 'Oh no!';
      },
      error: function ( xhr, textStatus, errorThrown )
      {
          console.log( 'AJAX call failed', xhr, textStatus, errorThrown );
      }               
  } );
  </code></pre>