You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by "Brandon Sloane (JIRA)" <ji...@apache.org> on 2019/07/02 19:05:00 UTC

[jira] [Created] (DAFFODIL-2176) DPath runExpressionForConstant catches IllegalStateException

Brandon Sloane created DAFFODIL-2176:
----------------------------------------

             Summary: DPath runExpressionForConstant catches IllegalStateException
                 Key: DAFFODIL-2176
                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2176
             Project: Daffodil
          Issue Type: Improvement
          Components: Clean Ups
            Reporter: Brandon Sloane


In DPathRuntime, runExpressionForConstant uses exceptions to signal when the expression in question cannot be compiled to a constant. 

In most cases, this exception would be either InfosetException or VariableException, which are expected, as the core reason an expression cannot be reduced to a constant would be a dependence on the infoset or DFDL variables.

However, we also check for IllegalStateException, which could also be thrown as a result of a geniune error. We should track down why we need to catch this exception and replace it with a more appropriate type.

I suspect that all the usages of IllegalStateException that we need to catch, are throwing it explictly as a sentinal to trigger runExpressionForConstant to bail, so this should be straightforward.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)