From: pines Date: Thu, 17 Aug 2006 20:04:15 +0000 (+0000) Subject: tweaks X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=9e58448f21c2851b7e24eb97daf1130d5adaac53;p=evergreen%2Fpines.git tweaks git-svn-id: svn://svn.open-ils.org/ILS/trunk@5570 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/chrome/content/util/network.js b/Open-ILS/xul/staff_client/chrome/content/util/network.js index fc7ecee3d0..b851cd839c 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/network.js +++ b/Open-ILS/xul/staff_client/chrome/content/util/network.js @@ -26,7 +26,7 @@ util.network.prototype = { } catch(E) { try { if (instanceOf(E, NetworkFailure)) { - obj.NETWORK_FAILURE = E.status(); + obj.NETWORK_FAILURE = E; } else { try { obj.NETWORK_FAILURE = js2JSON(E); } catch(F) { dump(F + '\n'); obj.NETWORK_FAILURE = E; }; } @@ -127,10 +127,6 @@ util.network.prototype = { var obj = this; var result = obj.get_result(req); if (result != null) return req; - if (obj.NETWORK_FAILURE == null) { - obj.error.sdump('D_SES_ERROR','method: ' + name + '\nparams: ' + js2JSON(params) + '\nReturned null. There was no NetworkFailure object thrown.'); - //return req; - } JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.init({'via':'stash'}); var proceed = true; @@ -146,8 +142,8 @@ util.network.prototype = { r = 1; } else { - try { obj.error.sdump('D_SES_ERROR','method: ' + name + '\nparams: '+ js2JSON(params) + '\nReturned null\n'); } catch(E) { alert(E); } - r = obj.error.yns_alert('Network/server failure. Please check your Internet connection to ' + data.server_unadorned + ' and choose Retry Network. If you need to enter Offline Mode, choose Proceed Offline in this and subsequent dialogs. If you believe this error is due to a bug in Evergreen and not network problems, please contact your helpdesk or friendly Evergreen admins, and give them this message: method=' + name + ' params=' + js2JSON(params) + ' status = ' + obj.NETWORK_FAILURE + '.','Network Failure','Retry Network','Proceed Offline',null,'Check here to confirm this message'); + try { obj.error.sdump('D_SES_ERROR','method: ' + name + '\nparams: '+ js2JSON(params) + '\nReturned null with a NETWORK_FAILURE = ' + obj.NETWORK_FAILURE + ( typeof obj.NETWORK_FAILURE.status == 'function' ? '.status() == ' + obj.NETWORK_FAILURE.status() : '') + '\n'); } catch(E) { alert(E); } + r = obj.error.yns_alert('Network/server failure. Please check your Internet connection to ' + data.server_unadorned + ' and choose Retry Network. If you need to enter Offline Mode, choose Proceed Offline in this and subsequent dialogs. If you believe this error is due to a bug in Evergreen and not network problems, please contact your helpdesk or friendly Evergreen admins, and give them this message: method=' + name + ' params=' + js2JSON(params) + ' thrown = ' + obj.NETWORK_FAILURE + (obj.NETWORK_FAILURE.status == 'function' ? '.status() == ' + obj.NETWORK_FAILURE.status() : '') + '.','Network Failure','Retry Network','Proceed Offline',null,'Check here to confirm this message'); if (r == 1) { data.proceed_offline = true; data.stash('proceed_offline'); dump('Remembering proceed_offline for 200000 ms.\n');