Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
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.