You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Jochen Kemnade (JIRA)" <ji...@apache.org> on 2014/05/13 15:23:23 UTC

[jira] [Closed] (TAP5-816) Add logs on reply script evaluation error

     [ https://issues.apache.org/jira/browse/TAP5-816?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Kemnade closed TAP5-816.
-------------------------------

    Resolution: Not a Problem

Another year has passed since the last comment. Therefore, we assume this issue has either been resolved in the meantime or it is no longer relevant to you.
If recent versions of Tapestry (i.e. 5.4 betas and 5.3.7) are still affected, please reopen the issue and adjust the "Affected Version/s" property.

> 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
>              Labels: bulk-close-candidate
>
> 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 was sent by Atlassian JIRA
(v6.2#6252)