[open-ils-commits] r10260 -
branches/rel_1_2/Open-ILS/web/opac/extras/selfcheck
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Aug 5 08:42:00 EDT 2008
Author: erickson
Date: 2008-08-05 08:41:54 -0400 (Tue, 05 Aug 2008)
New Revision: 10260
Modified:
branches/rel_1_2/Open-ILS/web/opac/extras/selfcheck/selfcheck.js
branches/rel_1_2/Open-ILS/web/opac/extras/selfcheck/selfcheck.xml
Log:
catch server errors on checkout, clear the pending transaction flag, store the exception text in a hidden div as a debugging tool
Modified: branches/rel_1_2/Open-ILS/web/opac/extras/selfcheck/selfcheck.js
===================================================================
--- branches/rel_1_2/Open-ILS/web/opac/extras/selfcheck/selfcheck.js 2008-08-05 12:34:03 UTC (rev 10259)
+++ branches/rel_1_2/Open-ILS/web/opac/extras/selfcheck/selfcheck.js 2008-08-05 12:41:54 UTC (rev 10260)
@@ -251,8 +251,17 @@
* attempts renewal. Any other events will display a message
*/
function selfckHandleCoResult(r) {
- var evt = r.getResultObject();
+ var evt;
+ try {
+ evt = r.getResultObject();
+ } catch(E) {
+ pendingXact = false;
+ selfckShowMsgNode({textcode:'UNKNOWN'});
+ appendClear($('selfck-errors'), text(E.toString()));
+ return;
+ }
+
if(evt.textcode == 'SUCCESS') {
selfckDislplayCheckout(evt);
selfckShowMsgNode(evt);
Modified: branches/rel_1_2/Open-ILS/web/opac/extras/selfcheck/selfcheck.xml
===================================================================
--- branches/rel_1_2/Open-ILS/web/opac/extras/selfcheck/selfcheck.xml 2008-08-05 12:34:03 UTC (rev 10259)
+++ branches/rel_1_2/Open-ILS/web/opac/extras/selfcheck/selfcheck.xml 2008-08-05 12:41:54 UTC (rev 10260)
@@ -87,7 +87,7 @@
<span class='biglabel' id='selfck-event-span'> </span>
<span class='hide_me'>
<span id='selfck-event-SUCCESS'>&selfck.event.co_success;</span>
- <span id='selfck-event-UNKNOWN'>&selfck.event.unknown;</span>
+ <span id='selfck-event-UNKNOWN'>&selfck.event.co_unknown;</span>
<span id='selfck-event-ACTOR_USER_NOT_FOUND'>&selfck.event.patron_not_found;</span>
<span id='selfck-event-COPY_CIRC_NOT_ALLOWED'>&selfck.event.item_nocirc;</span>
<span id='selfck-event-ITEM_NOT_CATALOGED'>&selfck.event.item_noncat;</span>
@@ -149,6 +149,8 @@
</div>
</div>
+ <div class='hide_me' id='selfck-errors'/>
+
<!--***********************************************************************
Generate the printable version of the checked out list here
*********************************************************************** -->
More information about the open-ils-commits
mailing list