You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Rene Gielen (Issue Comment Edited) (JIRA)" <ji...@apache.org> on 2011/11/30 23:01:40 UTC

[jira] [Issue Comment Edited] (WW-3318) throwExceptionOnFailure=true doesn't detect undefined property burried in OGNL

    [ https://issues.apache.org/jira/browse/WW-3318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13160380#comment-13160380 ] 

Rene Gielen edited comment on WW-3318 at 11/30/11 10:01 PM:
------------------------------------------------------------

I think I see your point here of taking a fail fast approach in production, similar to the use of "assert" statements in production code.

Your usecase seems to make sense, and we should consider what are the technical implications to support it. Changing the behavior of the combination of devMode and throwExceptionOnFailure seems to be easily achievable, yet we have to consider if changing this behavior would break existing code for other users. Some people might want to retain excactly the current behavior to have devMode as kind of a master switch for different setup profiles, embracing the fail silently approach.

That said, we might want to think of another property like, let's say, globalExceptionPropagation=true/false (maybe a really bad name, any suggestions appreciated) - this would override any combination of devMode and throwExceptionOnFailure if true, thus propagating failure exceptions in any environment.
                
      was (Author: rgielen):
    I think I see your point here of taking a fail fast approach in production, similar to the use of "assert" statements in production code.
Your usecase seems to make sense, and we should consider what are the technical implications to support it. Changing the behavior of the combination of devMode and throwExceptionOnFailure seems to be easy achievable, yet we have to consider if changing this behavior would break existing code for other user. And still, some people might want to retain the current behavior to have devMode as kind of a master switch for different setup profiles.
That said, we might want to think of another property like, let's say, globalExceptionPropagation=true/false (maybe a really bad name, any suggestion appreciated) - this would override any combination of devMode and throwExceptionOnFailure if true, thus propagating failure exceptions in any environment.
                  
> throwExceptionOnFailure=true doesn't detect undefined property burried in OGNL
> ------------------------------------------------------------------------------
>
>                 Key: WW-3318
>                 URL: https://issues.apache.org/jira/browse/WW-3318
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Value Stack
>    Affects Versions: 2.1.8
>            Reporter: Andreas Krüger
>            Assignee: Lukasz Lenart
>             Fix For: 2.2.x
>
>
> Setup:
> struts.el.throwExceptionOnFailure=true in struts.properties
> In the value stack, there is no object which has any property "xxx"
> The JSP has  <s:property value="xxx == null ? 'Not yet determined' : xxx" />
> Expected behaviour: As the property xxx is not defined, this should throw an exception.
> Behaviour seen: The string "Not yet determined" gets inserted into the HTML output as if nothing were wrong.

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