Implement the StreamError interface
Created attachment 189689 [details] Patch
This is to allow support of the Stream API. The complete version is at: https://bugs.webkit.org/show_bug.cgi?id=110194 See: https://dvcs.w3.org/hg/streams-api/raw-file/tip/Overview.htm#streamerror-error
Attachment 189689 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/WebCore.gypi', u'Source/WebCore/fileapi/StreamError.h', u'Source/WebCore/fileapi/StreamError.idl', u'Source/WebCore/page/DOMWindow.idl']" exit_code: 1 Source/WebCore/fileapi/StreamError.h:44: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Source/WebCore/fileapi/StreamError.h:45: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Source/WebCore/fileapi/StreamError.h:46: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Source/WebCore/fileapi/StreamError.h:47: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Source/WebCore/fileapi/StreamError.h:48: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Source/WebCore/fileapi/StreamError.h:49: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Source/WebCore/fileapi/StreamError.h:50: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Source/WebCore/fileapi/StreamError.h:51: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Source/WebCore/fileapi/StreamError.h:52: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Source/WebCore/fileapi/StreamError.h:53: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Source/WebCore/fileapi/StreamError.h:54: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Source/WebCore/fileapi/StreamError.h:55: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Source/WebCore/fileapi/StreamError.h:56: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Total errors found: 13 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 189689 [details] Patch Streams should use DOM4 style errors. Is there a working group where we can send out comments about the spec?
http://dom.spec.whatwg.org/#interface-domerror Basically, the modern way to do errors is to use strings rather than numeric codes. Also, you don't need to create a subclass for each features. Instead, you just use DOMError directly.
Take a look at how IndexedDB throws exceptions: http://www.w3.org/TR/IndexedDB/#exceptions
(In reply to comment #4) > (From update of attachment 189689 [details]) > Streams should use DOM4 style errors. > > Is there a working group where we can send out comments about the spec? The maintainer is listed as feras.moussa@hotmail.com. I'll send him an email, and modify my patch to match IndexedDB.