[open-ils-commits] r9513 - trunk/Open-ILS/web/js/dojo/fieldmapper
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue May 6 14:08:23 EDT 2008
Author: erickson
Date: 2008-05-06 14:08:20 -0400 (Tue, 06 May 2008)
New Revision: 9513
Modified:
trunk/Open-ILS/web/js/dojo/fieldmapper/Fieldmapper.js
Log:
added some more explicit error handling calls for easier debugging
Modified: trunk/Open-ILS/web/js/dojo/fieldmapper/Fieldmapper.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/fieldmapper/Fieldmapper.js 2008-05-06 16:21:22 UTC (rev 9512)
+++ trunk/Open-ILS/web/js/dojo/fieldmapper/Fieldmapper.js 2008-05-06 18:08:20 UTC (rev 9513)
@@ -99,9 +99,21 @@
if (!args.async && !args.timeout) args.timeout = 10;
+ if(!args.onmethoderror) {
+ args.onmethoderror = function(r, stat, stat_text) {
+ throw new Error('Method error: ' + r.stat + ' : ' + stat_text);
+ }
+ }
+
+ if(!args.ontransporterror) {
+ args.ontransporterror = function(xreq) {
+ throw new Error('Transport error status=' + xreq.status);
+ }
+ }
+
if (!args.onerror) {
args.onerror = function (r) {
- throw 'Error encountered! ' + r;
+ throw new Error('Request error encountered! ' + r);
}
}
More information about the open-ils-commits
mailing list