Cool. I think it's time for a JEXL 1.1 release.

On 8/7/06, Rahul Akolkar (JIRA) <[EMAIL PROTECTED]> wrote:
     [ http://issues.apache.org/jira/browse/JEXL-17?page=all ]

Rahul Akolkar resolved JEXL-17.
-------------------------------

    Resolution: Fixed

Thanks, fixed in r429169:

http://svn.apache.org/viewvc?view=rev&revision=429169

Reused the existing ParseException and added a couple of test cases to ensure 
the Error is rethrown as this Exception.


> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
http://www.multitask.com.au/people/dion/
"If you even dream of beating me you'd better wake up and apologize" -
Muhammad Ali

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to