Changeset 9513

Show
Ignore:
Timestamp:
05/06/08 14:08:20 (1 week ago)
Author:
erickson
Message:

added some more explicit error handling calls for easier debugging

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/Open-ILS/web/js/dojo/fieldmapper/Fieldmapper.js

    r9511 r9513  
    100100        if (!args.async && !args.timeout) args.timeout = 10; 
    101101 
     102        if(!args.onmethoderror) { 
     103            args.onmethoderror = function(r, stat, stat_text) { 
     104                throw new Error('Method error: ' + r.stat + ' : ' + stat_text); 
     105            } 
     106        } 
     107 
     108        if(!args.ontransporterror) { 
     109            args.ontransporterror = function(xreq) { 
     110                throw new Error('Transport error status=' + xreq.status); 
     111            } 
     112        } 
     113 
    102114                if (!args.onerror) { 
    103115                        args.onerror = function (r) { 
    104                                 throw 'Error encountered! ' + r; 
     116                                throw new Error('Request error encountered! ' + r); 
    105117                        } 
    106118                }