- From: Steven Pemberton <Steven.Pemberton@cwi.nl>
- Date: Wed, 02 Apr 2014 15:00:48 +0200
- To: "Forms WG" <public-forms@w3.org>
- Cc: "public-xformsusers@w3.org" <public-xformsusers@w3.org>
In several places when an error event is dispatched, the context information includes an indication of the error. I recently ran up against a problem with the context information for the xforms-submit-error event: if you get the event, then event('error-type') is meant to tell you what the problem is, but you get 'resource-error' for several different cases. It seems to me it would be better if we had a different error-type for each type of error. As a result I have collected all usage of error information in the spec, in order to see how it could be improved. There are two ways we could deal with this: 1) define new values of error-type for the extra cases 2) keep error-type the same, and add error-message with more detail, for the ambiguous cases. I'm also in favour of specifying that the default action for error events includes reporting it to the user. Summary of decisions to be made: - fix or not - use new values of error-type, or use error-message - agree on names - agree on extra information that is proposed between [] - be more explicit with xforms-action-error? - should error-information really be error-message? The values: Values for error-type 7.2 The xforms-submit Event https://www.w3.org/MarkUp/Forms/wiki/XForms_2.0#The_xforms-submit_Event) submission-in-progress no-data x 2 - really no data - no relevant data (proposed values: no-data; no-relevant-data) validation-error resource-error (= no resource specified) 7.2.1 Processing the Response from a Submission https://www.w3.org/MarkUp/Forms/wiki/XForms_2.0#Processing_the_Response_from_a_Submission resource-error x 3 - return value has a media-type that is not acceptable [it might be good to include the faulty media type] - replace="text" for a return value that is of neither a text type nor an XML type [likewise] - submission returned an error response [here it would be useful to make the error response available] Proposed values: result-media-type; result-text-media-type; result-error-response parse-error target-error - replacement instance is in a different model to the submission - replacement target is an empty sequence - replacement target is readonly - replacement target is a non-element Proposed values: target-model-error, target-empty, target-readonly; target-non-element Additionally xforms-action-error uses error-type https://www.w3.org/MarkUp/Forms/wiki/XForms_2.0#The_xforms-action-error_Event with values: expression-error binding-error script-error script-language-error other-error but there is no *explicit* text that specifies when expression-error, binding-error, or other-error occur. event('error-message') Three events use error-message as "Optional implementation-dependent error message, or the empty sequence." error-message is produced by xforms-binding-error xforms-expression-error xforms-compute-exception Finally there is event('error-information') - An implementation-specific error string which is used by xforms-version-exception, and I wonder if this shouldn't really be event('error-message'). Steven
Received on Wednesday, 2 April 2014 13:01:23 UTC