You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Denis Delangle (JIRA)" <ji...@apache.org> on 2009/08/18 16:25:14 UTC
[jira] Created: (TAP5-816) Add logs on reply script evaluation
error
Add logs on reply script evaluation error
-----------------------------------------
Key: TAP5-816
URL: https://issues.apache.org/jira/browse/TAP5-816
Project: Tapestry 5
Issue Type: Improvement
Components: tapestry-core
Affects Versions: 5.1.0.0
Reporter: Denis Delangle
Priority: Minor
On ajax queries, if the evaluation of the script part of the reply fails, no message is shown to the user. It is then tricky to solve issues. I only ask for logging of such errors.
Here is a diff for tapestry.js file adding a call to Tapestry.error. I don't know if exception should be thrown back afterwards.
Index: tapestry.js
===================================================================
--- tapestry.js (revision 805422)
+++ tapestry.js (working copy)
@@ -307,7 +307,15 @@
// evaluating the reply.script
// and other final steps.
- if (reply.script) eval(reply.script);
+
+ if (reply.script) {
+ try {
+ eval(reply.script);
+ } catch(e) {
+ //We catch any exception that can occur during script evaluation and we log it
+ Tapestry.error(Tapestry.Messages.clientException + e);
+ }
+ }
Tapestry.onDomLoadedCallback();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.