I'm seeing that if a condition is malformed it can either not allow a
new form to be started, (e.g. relevant="selected(/data/foo, 1)" raises
an exception with a message of "java.lang.Double", which is not very
helpful) or crash the app entirely (e.g. relevant="lkasjdsd d>
alskfae12" crashes the works).
Shouldn't a poorly formed condition just be ignored (that is, default
to true)? I assume this would be as easy as wrapping an appropriate
piece of code in a try/catch and gobbling any errors arising from
xpath evaluation...
i'm assuming the crash is in javarosa-core, right? i'm sure everyone
would appreciate a patch...
···
On Thu, Sep 1, 2011 at 20:00, Thomas Smyth wrote:
> I'm seeing that if a condition is malformed it can either not allow a
> new form to be started, (e.g. relevant="selected(/data/foo, 1)" raises
> an exception with a message of "java.lang.Double", which is not very
> helpful) or crash the app entirely (e.g. relevant="lkasjdsd d>
> alskfae12" crashes the works).
>
> Shouldn't a poorly formed condition just be ignored (that is, default
> to true)? I assume this would be as easy as wrapping an appropriate
> piece of code in a try/catch and gobbling any errors arising from
> xpath evaluation...
>
> Thoughts?
>
Can you file a bug and attach the crash log? We've tried to make ODK catch
and report all the errors output from javarosa, but I have noticed some
conditions that cause javarosa to crash, which in turn causes ODK to crash.
···
On Thu, Sep 1, 2011 at 10:42 AM, Yaw Anokwa wrote:
i'm assuming the crash is in javarosa-core, right? i'm sure everyone
would appreciate a patch...
I'm seeing that if a condition is malformed it can either not allow a
new form to be started, (e.g. relevant="selected(/data/foo, 1)" raises
an exception with a message of "java.lang.Double", which is not very
helpful) or crash the app entirely (e.g. relevant="lkasjdsd d>
alskfae12" crashes the works).
Shouldn't a poorly formed condition just be ignored (that is, default
to true)? I assume this would be as easy as wrapping an appropriate
piece of code in a try/catch and gobbling any errors arising from
xpath evaluation...
···
On 1 September 2011 13:50, Carl Hartung wrote:
> Can you file a bug and attach the crash log? We've tried to make ODK catch
> and report all the errors output from javarosa, but I have noticed some
> conditions that cause javarosa to crash, which in turn causes ODK to crash.
>
>
> On Thu, Sep 1, 2011 at 10:42 AM, Yaw Anokwa wrote:
>>
>> i'm assuming the crash is in javarosa-core, right? i'm sure everyone
>> would appreciate a patch...
>>
>> On Thu, Sep 1, 2011 at 20:00, Thomas Smyth wrote:
>> > I'm seeing that if a condition is malformed it can either not allow a
>> > new form to be started, (e.g. relevant="selected(/data/foo, 1)" raises
>> > an exception with a message of "java.lang.Double", which is not very
>> > helpful) or crash the app entirely (e.g. relevant="lkasjdsd d>
>> > alskfae12" crashes the works).
>> >
>> > Shouldn't a poorly formed condition just be ignored (that is, default
>> > to true)? I assume this would be as easy as wrapping an appropriate
>> > piece of code in a try/catch and gobbling any errors arising from
>> > xpath evaluation...
>> >
>> > Thoughts?
>> >
>
>