commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans Gilde <>
Subject RE: [jira] Created: (JELLY-163) Allow Expressions to throw exceptions
Date Tue, 23 Nov 2004 05:16:31 GMT

For most tags, expressions are evaluated at runtime, but immediately before
the tag itself becomes aware of them. They're evaluated by the enclosing
TagScript (a Script that runs a Tag) immediately before the tag itself is
run. The tag just knows about the result of the expression, not the actual

An exception at this time could be caught by the enclosing tag, but not by
the tag that should have received the expression. So, there's currently no
generic way to have a tag say "don't worry about expression evaluation
failures, just show me the contents/null/whatever".

Your example would work fine, the exception would be thrown out of the
script or could be caught by an enclosing tag.


-----Original Message-----
From: Paul Libbrecht [] 
Sent: Monday, November 15, 2004 5:14 AM
To: Jakarta Commons Developers List
Subject: Re: [jira] Created: (JELLY-163) Allow Expressions to throw


I think this is exactly what made me stumble... I don't really get 
(I'm again about my fuzzyness of understanding jelly lifecycle... sorry 
for this!). I see two times where such an exception can occur:
- at compilation time. This should be the same when a tag would meet 
unknown attributes or a (strict) taglib would meet an unknown tag.
- at execution time, when the expression should return something 
In both cases, the exception should be thrown and wrapped into some 
generic exception which should include location information.

My current attempt was the script:
<j:jelly xmlns:j="jelly:core">
     <j:set var="b" value="blop"/>
Which did throw me an exception (as I instructed it) but which was not 
caught, or wrapped...

In which of the two phases should such a thing be caught ?
Are there other phases ?



Le 15 nov. 04, à 02:32, Hans Gilde (JIRA) a écrit :

> Expressions are evaluated before the tag is run, so it normally 
> wouldn't know anything about them.

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message