[open-ils-commits] r16564 - trunk/Open-ILS/xul/staff_client/server/main (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Jun 2 17:35:01 EDT 2010


Author: phasefx
Date: 2010-06-02 17:34:55 -0400 (Wed, 02 Jun 2010)
New Revision: 16564

Modified:
   trunk/Open-ILS/xul/staff_client/server/main/ws_info.xul
Log:
some defensive programming

Modified: trunk/Open-ILS/xul/staff_client/server/main/ws_info.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/main/ws_info.xul	2010-06-02 19:24:14 UTC (rev 16563)
+++ trunk/Open-ILS/xul/staff_client/server/main/ws_info.xul	2010-06-02 21:34:55 UTC (rev 16564)
@@ -118,12 +118,17 @@
             util.widgets.remove_children( x );
 
             var default_lib = g.my_lib; 
-            if (typeof g.my_libs_ou_hash[ default_lib ] == 'undefined') {
-                default_lib = null;
-            } else {
-                if ( !get_bool( g.aout_hash[ g.my_libs_ou_hash[ default_lib ].ou_type() ].can_have_users() ) ) {
+            try {
+                if (typeof g.my_libs_ou_hash[ default_lib ] == 'undefined') {
                     default_lib = null;
+                } else {
+                    if ( !get_bool( g.aout_hash[ g.my_libs_ou_hash[ default_lib ].ou_type() ].can_have_users() ) ) {
+                        default_lib = null;
+                    }
                 }
+            } catch(E) {
+                dump('Error in ws_info.xul, render_menulist(): ' + E + '\n');
+                default_lib = null;
             }
 
             g.ml = util.widgets.make_menulist( 



More information about the open-ils-commits mailing list