diff options
Diffstat (limited to 'framework/Web/Javascripts')
-rw-r--r-- | framework/Web/Javascripts/js/ajax.js | 7 | ||||
-rw-r--r-- | framework/Web/Javascripts/prado/ajax3.js | 11 |
2 files changed, 13 insertions, 5 deletions
diff --git a/framework/Web/Javascripts/js/ajax.js b/framework/Web/Javascripts/js/ajax.js index 5deebd1b..a9d0fd73 100644 --- a/framework/Web/Javascripts/js/ajax.js +++ b/framework/Web/Javascripts/js/ajax.js @@ -46,8 +46,11 @@ method.toFunction().apply(this,command[method].concat(transport));else if(typeof {if(transport.status<500) {var msg='HTTP '+transport.status+" with response : \n";msg+=transport.responseText+"\n";msg+="Data : \n"+inspect(data)+"\n";msg+="Actions : \n";request.getHeaderData(Prado.CallbackRequest.ACTION_HEADER).each(function(action) {msg+=inspect(action)+"\n";}) -Logger.warn(msg);}},onException:function(e) -{Logger.error('Uncaught Callback Client Exception:',e);},formatException:function(e) +Logger.warn(msg);}},onException:function(request,e) +{msg="";for(var v in e) +{if(typeof(v[e])!="object"&&typeof(v[e])!="function") +msg+=v+":"+e[v]+"\n";} +Logger.error('Uncaught Callback Client Exception:',e);},formatException:function(e) {var msg=e.type+" with message \""+e.message+"\"";msg+=" in "+e.file+"("+e.line+")\n";msg+="Stack trace:\n";var trace=e.trace;for(var i=0;i<trace.length;i++) {msg+=" #"+i+" "+trace[i].file;msg+="("+trace[i].line+"): ";msg+=trace[i]["class"]+"->"+trace[i]["function"]+"()"+"\n";} msg+=e.version+" "+e.time+"\n";return msg;}},encode:function(data) diff --git a/framework/Web/Javascripts/prado/ajax3.js b/framework/Web/Javascripts/prado/ajax3.js index 2caaf553..15f60631 100644 --- a/framework/Web/Javascripts/prado/ajax3.js +++ b/framework/Web/Javascripts/prado/ajax3.js @@ -19,8 +19,7 @@ Object.extend(Ajax.Request.prototype, Prado.CallbackRequest.updatePageState(this,transport);
Ajax.Responders.dispatch('on' + transport.status, this, transport, json);
Prado.CallbackRequest.dispatchActions(transport,this.getHeaderData(Prado.CallbackRequest.ACTION_HEADER));
-
-
+
(this.options['on' + this.transport.status]
|| this.options['on' + (this.responseIsSuccess() ? 'Success' : 'Failure')]
|| Prototype.emptyFunction)(transport, json);
@@ -179,8 +178,14 @@ Object.extend(Prado.CallbackRequest, /**
* Uncaught exceptions during callback response.
*/
- onException : function(e)
+ onException : function(request,e)
{
+ msg = "";
+ for(var v in e)
+ {
+ if(typeof(v[e]) != "object" && typeof(v[e]) != "function")
+ msg += v+":"+e[v]+"\n";
+ }
Logger.error('Uncaught Callback Client Exception:', e);
},
|