Issue #2 new

fail gracefully when encountering an unknown function

Yaw Anokwa
created an issue

When loading a form with arbitrary function calls, javarosa dies with an unhandled exception. example where review() is the arbitrary function:

{{{ E/AndroidRuntime( 743): Uncaught handler: thread main exiting due to uncaught exception E/AndroidRuntime( 743): org.javarosa.xpath.XPathUnhandledException: XPath evaluation: cannot handle function 'review' E/AndroidRuntime( 743): at org.javarosa.xpath.expr.XPathFuncExpr.eval( E/AndroidRuntime( 743): at org.javarosa.xpath.XPathConditional.evalRaw( E/AndroidRuntime( 743): at org.javarosa.xpath.XPathConditional.eval( E/AndroidRuntime( 743): at org.javarosa.core.model.FormDef.evaluateConstraint( }}}

This should be handled gracefully and either logged as a warning/error, or pushed through the UI to the user. Either way, the form should still work.

Comments (0)

  1. Log in to comment