Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

A number of updates #34

Merged
merged 1 commit into from
Jul 4, 2013
Merged

Conversation

ClaesNilsson
Copy link
Contributor

* Error handling: sysapps#18
* Permission: sysapps#21
* Local address/port attributes: sysapps#24
* Naming of join/leave multicast group methods: sysapps#27
* Erroneous send steps: sysapps#30
* Added ref to Github repository in header
@marcoscaceres
Copy link
Contributor

review started ... 7 minutes late! :)

@ClaesNilsson
Copy link
Contributor Author

Thanks!!!

buffered but the buffer is full or because there is an error in the
underlying protocol, the user agent MUST set an internal
"IgnoreAllSendCalls" flag and <a>queue a task</a> that executes
the following substeps and then abort the following steps:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is different in this API from Web Sockets that requires asynchronous error handling? We can handle this as a separate bug. I'm just wondering.

@marcoscaceres
Copy link
Contributor

I think it's ok to merge, but have some strong reservations about the error handling model that has been defined.

@ClaesNilsson
Copy link
Contributor Author

The background to theses updates on error handling is a mail dialogue between me and Jonas:
http://lists.w3.org/Archives/Public/public-sysapps/2013Jul/0008.html
http://lists.w3.org/Archives/Public/public-sysapps/2013Jul/0017.html
http://lists.w3.org/Archives/Public/public-sysapps/2013Jul/0020.html

So, the basic problem with error handling that Jonas addresses is that with the standard DOMError interface the granularity of machine readable error names are too limited. An example is when the attempt to create a TCP socket fails. The reason can for example be "no network contact"," peer does not respond" and "local address/port pair is already in use". The available DOM error names does not make it possible to separate these error reasons and the only sensible error name for all these situations is "NetworkError".

In the previous version of the specification I tried to solve this problem by distinguishing between these error reasons with the DOMError message attribute. However, the message attribute contains an implementation dependent message to be displayed to the user. Using this attribute does not make machine readable handling of errors possible, i.e. the application can not be coded to handle these dirrent error reasons in different manners.

The http://darobin.github.io/api-design-cookbook/ does not give much guidence here. So after discussion with Jonas I took the approach of subclassing DOMError and added the "type" attribute that provides a more detailed error definition than the "name" attribute.

This problem with error handling is probably applicable for more W3C specifications and it would be good if the authors of the DOM-specification stated a recommended approach on how to define a more granular error handling.

@marcoscaceres
Copy link
Contributor

@ClaesNilsson thanks for the background - I understand the issue and rationale (though I'm still feeling uneasy about it - but that's probably a bit of my ignorance on the subject). I'll read those threads. Please feel free to merge and I can follow up in bugs.

ClaesNilsson added a commit that referenced this pull request Jul 4, 2013
@ClaesNilsson ClaesNilsson merged commit d770bc3 into sysapps:gh-pages Jul 4, 2013
@ClaesNilsson
Copy link
Contributor Author

Merged now. Thanks for your review Marcos!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants