You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org> on 2009/04/18 00:24:14 UTC

[jira] Closed: (TAP5-571) Misplaced results in an inscrutable exception

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

Howard M. Lewis Ship closed TAP5-571.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 5.1.0.4

This situation can be tracked inside the template parser, and that's the way the fix was implemented.

> Misplaced <t:parameter> results in an inscrutable exception
> -----------------------------------------------------------
>
>                 Key: TAP5-571
>                 URL: https://issues.apache.org/jira/browse/TAP5-571
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.0
>            Reporter: Igor Drobiazko
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.1.0.4
>
>
> If <t:parameter> is used not inside a component, a inscrutable exception occurs. The message of the exception doesn't tell at all what the reason was.
> PageLoaderProcessor should catch the IllegalStateException inside the method parameter(ParameterToken) and throw TapestryException containing the location of the current token. This will provide a reasonable exception report.
> java.lang.IllegalStateException: Stack is empty.
> 	at org.apache.tapestry5.ioc.util.Stack.checkIfEmpty(Stack.java:119)
> 	at org.apache.tapestry5.ioc.util.Stack.peek(Stack.java:131)
> 	at org.apache.tapestry5.internal.services.PageLoaderProcessor.parameter(PageLoaderProcessor.java:594)
> 	at org.apache.tapestry5.internal.services.PageLoaderProcessor.loadTemplateForComponent(PageLoaderProcessor.java:519)
> 	at org.apache.tapestry5.internal.services.PageLoaderProcessor.workComponentQueue(PageLoaderProcessor.java:834)
> 	at org.apache.tapestry5.internal.services.PageLoaderProcessor.loadPage(PageLoaderProcessor.java:392)
> 	at org.apache.tapestry5.internal.services.PageLoaderImpl.loadPage(PageLoaderImpl.java:59)
> 	at $PageLoader_11ff4e54e7f.loadPage($PageLoader_11ff4e54e7f.java)
> 	at org.apache.tapestry5.internal.services.PagePoolCache.checkout(PagePoolCache.java:210)
> 	at org.apache.tapestry5.internal.services.PagePoolImpl.checkout(PagePoolImpl.java:99)
> To reproduce the problem create the following page:
> <html xml:space="default" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>     <body>
>          <t:unless test="some condition">
>                     Foo
>           </t:unless>
>          <t:parameter name="else">
>                   Bar
>          </t:parameter>
>    </body>
> </html>

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