Errors vs. exceptions

All,

I have a task of figuring out whether we need to rename some/all -error
events to -exception events (or the other way around ;).

In XForms 1.1, we had non-fatal -exception events, and fatal (stopping
processing without any way of recovering) -error events (the opposite of
Java!).

In XForms 2, we no longer have events which are necessarily fatal: all
previously-fatal events can be canceled (that is, we can cancel the default
action which is to stop processing) and are renamed into -error.

This would seem to call for calling them -error, following the XForms 1.1
convention, and also following xforms-submit-error and xforms-output-error
which never were fatal. Also, "error" is shorter than "exception", which is
nice.

Then there is the question of backward-compatibility. One rationale for
just creating new -error events and removing the old -exception events is
that there was no way to really do much with -exception events as they
would stop processing soon after being dispatched. So I think that
backward-compatibility is not a big issue here. We *could* consider keeping
-exception events alongside the new -error events, but that probably
wouldn't bring much benefit.

So I think the naming -error is acceptable.

One question coming to mind is whether we should consider never halting
processing, that is making recovering from errors the default, instead of
requiring the form author to catch all those events.

-Erik

Received on Wednesday, 7 September 2016 05:36:35 UTC