Problem with ajax timeouts and IE7

Problem with ajax timeouts and IE7

I'm using $.ajax and I'm having jQuery throw an error inside its code. 

From 5229 of the uncompressed jQuery.. 

  1. try {
  2.         var oldAbort = xhr.abort;
  3.         xhr.abort = function() {
  4.           if (xhr) {
  5.             oldAbort.call(xhr);
  6.           }

  7.           onreadystatechange("abort");
  8.         };
  9.       } catch (e) { 
Line # 6 above is what is throwing an error in IE's debugger. Yes, its in a try/catch, but that isn't stopping IE from throwing an error and preventing my $.ajax error function from being called. 

Edit: it appears that since its in a callback function the try/catch doesn't have an effect (apparently I'm still not awake this morning). 

My code looks like.. 

  1. xhr = $.ajax({
  2.           url: baseUrl + "/Gears/online",
  3.           cache: false,
  4.           dataType: 'text',
  5.           timeout: 7000,
  6.           error: function(xhr, errorDesc) {
  7.             // Error
  8.             location.href = baseUrl + "/Account/Logon";
  9.           },
  10.           success: function(data, status, xhr) {
  11.             // Able to retrieve a request from the server
  12.             //debugger;
  13.             if (xhr.status == 403) {
  14.               // not logged in, redirect to login page
  15.               location.href = baseUrl + "/Account/Logon";
  16.               return;
  17.             }
  18.             else if (data == "OK") {
  19.               // System is online

  20.               if (_backOnlineReAuth) {
  21.                 // changed user, reauth
  22.                 location.href = baseUrl + "/Account/LogOff";
  23.                 return;
  24.               }

  25.               // Good to go!
  26.               if (_isOnline) return;

  27.               // Status change: Offline -> Online
  28.               _goOnline();
  29.               console.notice("Back Online", "Connection restored");
  30.             }
  31.           },
  32.           complete: function() {
  33.             // Continue with the next item in the app start-up queue
  34.             nextQueue();
  35.           }
  36.         });
  37.       }