You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Ryan Ernst (JIRA)" <ji...@apache.org> on 2016/01/07 20:43:39 UTC
[jira] [Commented] (LUCENE-6965) Expression's JavascriptCompiler to
throw ParseExceptions with bad function names or arity
[ https://issues.apache.org/jira/browse/LUCENE-6965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15087966#comment-15087966 ]
Ryan Ernst commented on LUCENE-6965:
------------------------------------
ParseException seems fine, but why the intermediate exception? Also, it looks like you are losing stack frames when creating a new exception from the intermediate.
> Expression's JavascriptCompiler to throw ParseExceptions with bad function names or arity
> -----------------------------------------------------------------------------------------
>
> Key: LUCENE-6965
> URL: https://issues.apache.org/jira/browse/LUCENE-6965
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Tomás Fernández Löbbe
> Attachments: LUCENE-6965.patch
>
>
> Currently JavascriptCompiler will throw IllegalArgumentException for bad function names (or functions that don't exist) and for bad arity. I can see why this was done this way, but I believe ParseException would also be correct and it would be better since that's the exception clients will be prepared to receive.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org