You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Frank Cornelis (JIRA)" <co...@jakarta.apache.org> on 2005/03/30 10:28:17 UTC
[jira] Updated: (JELLY-206) cannot nest catch tags
[ http://issues.apache.org/jira/browse/JELLY-206?page=history ]
Frank Cornelis updated JELLY-206:
---------------------------------
Attachment: CatchTag-inside-define-tag-tracking-local-context.patch
This patch makes that j:catch keeps track of all received contexts. This is needed when used inside a define:tag.
> cannot nest catch tags
> ----------------------
>
> Key: JELLY-206
> URL: http://issues.apache.org/jira/browse/JELLY-206
> Project: jelly
> Type: Bug
> Components: core / taglib.core
> Versions: 1.0-RC2
> Environment: jelly:junit test
> Reporter: Frank Cornelis
> Attachments: CatchTag-inside-define-tag-tracking-local-context.patch
>
> The outer tag does not receive the 'rethrown' exception. How come?
> <?xml version="1.0"?>
> <test:suite
> xmlns:j="jelly:core"
> xmlns:test="jelly:junit"
> xmlns:define="jelly:define"
> xmlns:log="jelly:log">
>
> <test:case name="nested exceptions" xmlns:my="mytaglib">
>
> <define:taglib uri="mytaglib">
>
> <define:tag name="mytag">
> <j:scope>
> <j:catch var="ex">
> <define:invokeBody/>
> </j:catch>
>
> <log:info>mytag ${name} after catch block exception: ${ex}</log:info>
>
> <j:if test="${ex != null}">
> <log:debug>exception was caught !!!</log:debug>
> <test:fail>rethrowing the exception</test:fail>
> <log:debug>CANNOT REACH THIS POINT !!!</log:debug>
> </j:if>
> </j:scope>
> </define:tag>
>
> </define:taglib>
>
> <my:mytag name="outer">
> <my:mytag name="inner">
> <test:fail>boom</test:fail>
> </my:mytag>
> </my:mytag>
>
> </test:case>
> </test:suite>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org