Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 1362 invoked from network); 23 Nov 2004 05:21:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 23 Nov 2004 05:21:32 -0000 Received: (qmail 74344 invoked by uid 500); 23 Nov 2004 05:21:29 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 74291 invoked by uid 500); 23 Nov 2004 05:21:29 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 74273 invoked by uid 99); 23 Nov 2004 05:21:28 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: 167.206.5.78 is neither permitted nor denied by domain of hgilde-commons@earthlink.net) Received: from [167.206.5.78] (HELO mta5.srv.hcvlny.cv.net) (167.206.5.78) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 22 Nov 2004 21:21:27 -0800 Received: from hans (ool-18b88ec8.dyn.optonline.net [24.184.142.200]) by mta5.srv.hcvlny.cv.net (iPlanet Messaging Server 5.2 HotFix 1.25 (built Mar 3 2004)) with ESMTP id <0I7M00MYG9BBND@mta5.srv.hcvlny.cv.net> for commons-dev@jakarta.apache.org; Tue, 23 Nov 2004 00:16:23 -0500 (EST) Date: Tue, 23 Nov 2004 00:16:31 -0500 From: Hans Gilde Subject: RE: [jira] Created: (JELLY-163) Allow Expressions to throw exceptions In-reply-to: <1C9FEAF0-36EF-11D9-B323-000A95C50B1C@activemath.org> To: 'Jakarta Commons Developers List' Message-id: <0I7M00MYH9BBND@mta5.srv.hcvlny.cv.net> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Mailer: Microsoft Office Outlook, Build 11.0.6353 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: quoted-printable Thread-index: AcTK++iHk+fdXOdwTpqJkwyXJOI16gAd3VFg X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Paul, 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 evaluation. 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. Hans -----Original Message----- From: Paul Libbrecht [mailto:paul@activemath.org]=20 Sent: Monday, November 15, 2004 5:14 AM To: Jakarta Commons Developers List Subject: Re: [jira] Created: (JELLY-163) Allow Expressions to throw exceptions Hans, I think this is exactly what made me stumble... I don't really get=20 this... (I'm again about my fuzzyness of understanding jelly lifecycle... sorry=20 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=20 unknown attributes or a (strict) taglib would meet an unknown tag. - at execution time, when the expression should return something=20 (maybe). In both cases, the exception should be thrown and wrapped into some=20 generic exception which should include location information. My current attempt was the script: ${b-'b'} Which did throw me an exception (as I instructed it) but which was not=20 caught, or wrapped... In which of the two phases should such a thing be caught ? Are there other phases ? thanks paul Le 15 nov. 04, =E0 02:32, Hans Gilde (JIRA) a =E9crit : > Expressions are evaluated before the tag is run, so it normally=20 > wouldn't know anything about them. --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org