You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Simone Gianni (JIRA)" <ji...@apache.org> on 2007/01/06 16:39:27 UTC

[jira] Created: (COCOON-1978) JXTemplate often fail a method call without giving any error

JXTemplate often fail a method call without giving any error
------------------------------------------------------------

                 Key: COCOON-1978
                 URL: https://issues.apache.org/jira/browse/COCOON-1978
             Project: Cocoon
          Issue Type: Bug
          Components: Blocks: Templating
    Affects Versions: 2.2-dev (Current SVN)
            Reporter: Simone Gianni


When calling a method on an instance in JXTemplate, if that method does not exist (or JX cannot find the proper method based on parameters), it fails without any error. IMO it should raise an error, or at least should raise it in dev mode, because not having a debugger it takes hours to figure out why it's not working.

As an example, take a JX and try to call a method that does not exist :

<jx:set var="any" value="${obj.getSomethingThatDoesNotExist(cocoon.request)}"/>

Any will simply be null. Moreover, even if "any" is then used :

${any.getSomethingElse()}

Again it will fail without any error, resulting simply in an empty string, making it even harder.

Being a non compiled language already makes it difficult to make sure calls are correct, having this "silent fail" behavior makes it even harder, and if you add also the non typized nature it can make it a nightmare.

Anyway, I don't know if there is a way to fix this in cocoon or if it is a Jexl design problem.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (COCOON-1978) JXTemplate often fail a method call without giving any error

Posted by "Leszek Gawron (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COCOON-1978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532595 ] 

Leszek Gawron commented on COCOON-1978:
---------------------------------------

looks like there is no way to fix this without invading Jexl source: http://thread.gmane.org/gmane.text.xml.cocoon.devel/75481

> JXTemplate often fail a method call without giving any error
> ------------------------------------------------------------
>
>                 Key: COCOON-1978
>                 URL: https://issues.apache.org/jira/browse/COCOON-1978
>             Project: Cocoon
>          Issue Type: Bug
>          Components: Blocks: Templating
>    Affects Versions: 2.2-dev (Current SVN)
>            Reporter: Simone Gianni
>            Assignee: Leszek Gawron
>
> When calling a method on an instance in JXTemplate, if that method does not exist (or JX cannot find the proper method based on parameters), it fails without any error. IMO it should raise an error, or at least should raise it in dev mode, because not having a debugger it takes hours to figure out why it's not working.
> As an example, take a JX and try to call a method that does not exist :
> <jx:set var="any" value="${obj.getSomethingThatDoesNotExist(cocoon.request)}"/>
> Any will simply be null. Moreover, even if "any" is then used :
> ${any.getSomethingElse()}
> Again it will fail without any error, resulting simply in an empty string, making it even harder.
> Being a non compiled language already makes it difficult to make sure calls are correct, having this "silent fail" behavior makes it even harder, and if you add also the non typized nature it can make it a nightmare.
> Anyway, I don't know if there is a way to fix this in cocoon or if it is a Jexl design problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (COCOON-1978) JXTemplate often fail a method call without giving any error

Posted by "Leszek Gawron (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COCOON-1978?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leszek Gawron reassigned COCOON-1978:
-------------------------------------

    Assignee: Leszek Gawron

> JXTemplate often fail a method call without giving any error
> ------------------------------------------------------------
>
>                 Key: COCOON-1978
>                 URL: https://issues.apache.org/jira/browse/COCOON-1978
>             Project: Cocoon
>          Issue Type: Bug
>          Components: Blocks: Templating
>    Affects Versions: 2.2-dev (Current SVN)
>            Reporter: Simone Gianni
>            Assignee: Leszek Gawron
>
> When calling a method on an instance in JXTemplate, if that method does not exist (or JX cannot find the proper method based on parameters), it fails without any error. IMO it should raise an error, or at least should raise it in dev mode, because not having a debugger it takes hours to figure out why it's not working.
> As an example, take a JX and try to call a method that does not exist :
> <jx:set var="any" value="${obj.getSomethingThatDoesNotExist(cocoon.request)}"/>
> Any will simply be null. Moreover, even if "any" is then used :
> ${any.getSomethingElse()}
> Again it will fail without any error, resulting simply in an empty string, making it even harder.
> Being a non compiled language already makes it difficult to make sure calls are correct, having this "silent fail" behavior makes it even harder, and if you add also the non typized nature it can make it a nightmare.
> Anyway, I don't know if there is a way to fix this in cocoon or if it is a Jexl design problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COCOON-1978) JXTemplate often fail a method call without giving any error

Posted by "Grzegorz Kossakowski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COCOON-1978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12526587 ] 

Grzegorz Kossakowski commented on COCOON-1978:
----------------------------------------------

Simone, can you test if this issue is still present? I've been debugging JEXL many times lately so I know internals of JEXL quite well and maybe could do something with it.

> JXTemplate often fail a method call without giving any error
> ------------------------------------------------------------
>
>                 Key: COCOON-1978
>                 URL: https://issues.apache.org/jira/browse/COCOON-1978
>             Project: Cocoon
>          Issue Type: Bug
>          Components: Blocks: Templating
>    Affects Versions: 2.2-dev (Current SVN)
>            Reporter: Simone Gianni
>
> When calling a method on an instance in JXTemplate, if that method does not exist (or JX cannot find the proper method based on parameters), it fails without any error. IMO it should raise an error, or at least should raise it in dev mode, because not having a debugger it takes hours to figure out why it's not working.
> As an example, take a JX and try to call a method that does not exist :
> <jx:set var="any" value="${obj.getSomethingThatDoesNotExist(cocoon.request)}"/>
> Any will simply be null. Moreover, even if "any" is then used :
> ${any.getSomethingElse()}
> Again it will fail without any error, resulting simply in an empty string, making it even harder.
> Being a non compiled language already makes it difficult to make sure calls are correct, having this "silent fail" behavior makes it even harder, and if you add also the non typized nature it can make it a nightmare.
> Anyway, I don't know if there is a way to fix this in cocoon or if it is a Jexl design problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.