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

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Sep 30 17:02:06 EDT 2009


Author: phasefx
Date: 2009-09-30 17:02:01 -0400 (Wed, 30 Sep 2009)
New Revision: 14241

Modified:
   trunk/Open-ILS/xul/staff_client/server/circ/util.js
Log:
error handling here is abysmal

Modified: trunk/Open-ILS/xul/staff_client/server/circ/util.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/util.js	2009-09-30 20:55:03 UTC (rev 14240)
+++ trunk/Open-ILS/xul/staff_client/server/circ/util.js	2009-09-30 21:02:01 UTC (rev 14241)
@@ -2110,17 +2110,16 @@
 		}
 
         function checkin_callback(req) {
+            JSAN.use('util.error'); var error = new util.error();
             try {
                 var check = req.getResultObject();
                 var r = circ.util.checkin_via_barcode2(session,params,backdate,auto_print,check);
                 if (typeof params.checkin_result == 'function') {
-                    try { params.checkin_result(r); }
-                    catch(E) { error.sdump('D_ERROR','params.checkin_result() = ' + E); };
+                    try { params.checkin_result(r); } catch(E) { error.sdump('D_ERROR','params.checkin_result() = ' + E); };
                 }
 				if (typeof async == 'function') async(check);
 				return check;
             } catch(E) {
-                JSAN.use('util.error'); var error = new util.error();
                 error.standard_unexpected_error_alert(document.getElementById('circStrings').getFormattedString('staff.circ.checkin.error', ['1']), E);
                 if (typeof params.enable_textbox == 'function') {
                     try { params.enable_textbox(); }



More information about the open-ils-commits mailing list