From: phasefx Date: Wed, 30 Sep 2009 21:02:01 +0000 (+0000) Subject: error handling here is abysmal X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=bf74d0ea5fc963c3a737a954e9300bb55a07ff6c;p=evergreen%2Fmasslnc.git error handling here is abysmal git-svn-id: svn://svn.open-ils.org/ILS/trunk@14241 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js index 3e61ac3da6..94dbe882ec 100644 --- a/Open-ILS/xul/staff_client/server/circ/util.js +++ b/Open-ILS/xul/staff_client/server/circ/util.js @@ -2110,17 +2110,16 @@ circ.util.checkin_via_barcode = function(session,params,backdate,auto_print,asyn } 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(); }