Thank you for the response.  A conditional definitely works, as does a
specific namespaced function, e.g. ${val:orError(my.field)} -- if I cannot
persuade our template authors of either of these approaches, I will look at
working towards building a case and a PR around TemplateInterpreter.

On Fri, Aug 30, 2019 at 11:25 AM henrib <hen...@apache.org> wrote:

> I don't see any current way to throw an exception on null evaluation
> through
> configuration.
> A case can be made to add this as a feature (a hook checking eval result
> before doPrint in TemplateInterpreter).
> And about making this use case, you can't workaround using a conditional
> (${user3.firstName?:error()}) and you definitely must throw an error in the
> case of null evaluation?
> Cheers
> Henrib
>
>
>
> --
> Sent from:
> http://apache-commons.680414.n4.nabble.com/Commons-User-f735979.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
>
>

Reply via email to