Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 19809 invoked from network); 5 Aug 2006 19:04:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Aug 2006 19:04:54 -0000 Received: (qmail 95412 invoked by uid 500); 5 Aug 2006 19:04:52 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 95333 invoked by uid 500); 5 Aug 2006 19:04:52 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: 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 95322 invoked by uid 99); 5 Aug 2006 19:04:52 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Aug 2006 12:04:52 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Aug 2006 12:04:52 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 1306C410023 for ; Sat, 5 Aug 2006 19:02:14 +0000 (GMT) Message-ID: <22899729.1154804534075.JavaMail.jira@brutus> Date: Sat, 5 Aug 2006 12:02:14 -0700 (PDT) From: "Kohsuke Kawaguchi (JIRA)" To: commons-dev@jakarta.apache.org Subject: [jira] Created: (JEXL-17) ExpressionFactory.createNewExpression should throw an Exception in case of a parsing error, not Error MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ExpressionFactory.createNewExpression should throw an Exception in case of a parsing error, not Error ----------------------------------------------------------------------------------------------------- Key: JEXL-17 URL: http://issues.apache.org/jira/browse/JEXL-17 Project: Commons JEXL Issue Type: Improvement Affects Versions: Nightly Builds Reporter: Kohsuke Kawaguchi Attachments: JEXL-17.diff When ExpressionFactory.createNewExpression(...) takes an syntactically incorrect expression, JEXL throws TokenMgrError. However, typical callers (such as Jelly) don't expect such syntax error to be a java.lang.Error, so it fails to catch it. A typical outcome is therefore the thread to die completely, and even worse the stack trace doesn't report neither what was the expression that was being parsed, nor does it report any contextual information (again in case of Jelly, that would be where in the jelly script this error happened.) This makes the error diagnosis unnecessarily hard. I believe the proper thing to do is to wrap such an exception into java.lang.Exception or its sub-class, allowing the caller to catch it. -- 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 - For more information on JIRA, 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