[ 
https://issues.apache.org/jira/browse/JEXL-341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17358572#comment-17358572
 ] 

Henri Biestro commented on JEXL-341:
------------------------------------



I must be missing the obvious but JexlException is subclassed in 
JexlException.{Variable,Property,Method,Operator,Parsing,Feature,Ambiguous} 
which are the actual instances thrown. The class names are mostly self 
explanatory and the actual messages reflect those names.
And again, if you were to provide a JexlInfo when creating the script, you 
wouldn't have the default context (the class name/method) in your exception 
message but yours (as in 'Validation for login' or whatever you see fit).

And 3.2 has just  been released. 

> Errors needs to provide more information on caught exceptions.
> --------------------------------------------------------------
>
>                 Key: JEXL-341
>                 URL: https://issues.apache.org/jira/browse/JEXL-341
>             Project: Commons JEXL
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Garret Wilson
>            Assignee: Henri Biestro
>            Priority: Trivial
>             Fix For: 3.2
>
>
> I have a method {{bar()}} that happens to throw a {{NullPointerException}}. A 
> bug, of course. But when I use the following expression in JEXL:
> {noformat}foo.bar(){noformat}
> The {{JexlException.getMessage()}} result is:
> {noformat}io.guise.mesh.JexlMexlEvaluator.evaluate@1:… bar{noformat}
> This is too little information to be helpful (and too much irrelevant 
> information— see JEXL-340). If a {{NullPointerException}} occurred during 
> invocation of the method, it would be nice to know that. Otherwise the 
> developer has no idea if JEXL couldn't find {{bar()}} or what exactly the 
> problem was.
> Obviously this is is a low priority bug that is in no way blocking anything. 
> But it sure would be helpful if it could be improved one day.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to