error handling
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 22 Jun 2006 17:34:18 +0000 (17:34 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 22 Jun 2006 17:34:18 +0000 (17:34 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@4702 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/util/error.js
Open-ILS/xul/staff_client/chrome/content/util/network.js

index 1472c71..783ef81 100644 (file)
@@ -236,7 +236,7 @@ util.error.prototype = {
                        }
                }
                if (!msg) msg = '';
-               var alert_msg = 'FIXME:  If you encounter this alert, please inform your IT/ILS helpdesk staff or your friendly Evergreen developers.\n\n' + msg + '\n\n' + (typeof E.ilsevent != 'undefined' ? E.textcode + '\n' + E.desc : ( typeof E.status != 'undefined' ? 'Status: ' + E.status : '' ) );
+               var alert_msg = 'FIXME:  If you encounter this alert, please inform your IT/ILS helpdesk staff or your friendly Evergreen developers.\n\n' + msg + '\n\n' + (typeof E.ilsevent != 'undefined' ? E.textcode + '\n' + (E.desc ? E.desc + '\n' : '') : '') + ( typeof E.status != 'undefined' ? 'Status: ' + E.status + '\n': '' );
                obj.sdump('D_ERROR',msg + ' : ' + js2JSON(E));
                var r = obj.yns_alert(
                        alert_msg,      
index f4ab6b8..4e5fea4 100644 (file)
@@ -53,7 +53,11 @@ util.network.prototype = {
                                                        req = obj.check_for_offline(app,name,params,req,o_params);
                                                        f(req);
                                                } catch(E) {
-                                                       alert(E);
+                                                       try {
+                                                               E.ilsevent = -2;
+                                                               E.textcode = 'Server/Method Error';
+                                                       } catch(F) {}
+                                                       f( { 'getResultObject' : function() { return E; } } );
                                                }
                                        }
                                );
@@ -75,7 +79,7 @@ util.network.prototype = {
 
                } catch(E) {
                        if (instanceOf(E,perm_ex)) {
-                               alert('permission exception: ' + js2JSON(E));
+                               alert('in util.network, _request : permission exception: ' + js2JSON(E));
                        }
                        throw(E);
                }
@@ -218,7 +222,7 @@ util.network.prototype = {
                                        }
                                        return req;
                                } catch(E) {
-                                       alert(E);
+                                       alert('in util.network, rerequest_on_override, override:' + E);
                                }
                        }