commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank Cornelis (JIRA)" <commons-...@jakarta.apache.org>
Subject [jira] Commented: (JELLY-206) cannot nest catch tags
Date Tue, 29 Mar 2005 18:22:22 GMT
     [ http://issues.apache.org/jira/browse/JELLY-206?page=comments#action_61760 ]
     
Frank Cornelis commented on JELLY-206:
--------------------------------------

That was a quick feedback :)
Even after applying patchCatchTag2.txt the problem remains.
It appears to be due to the fact that the exception variable is set in a different JellyContext
as the one by which it is being referred by later on in other jelly tags. This can be easily
checked via an output of: ${context}

> 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

>
> 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


Mime
View raw message