Bug 110558 - Implement the StreamError interface
Summary: Implement the StreamError interface
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Zachary Kuznia
URL:
Keywords:
Depends on:
Blocks: 110194
  Show dependency treegraph
 
Reported: 2013-02-21 22:38 PST by Zachary Kuznia
Modified: 2014-11-21 09:08 PST (History)
9 users (show)

See Also:


Attachments
Patch (8.34 KB, patch)
2013-02-21 22:39 PST, Zachary Kuznia
abarth: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zachary Kuznia 2013-02-21 22:38:37 PST
Implement the StreamError interface
Comment 1 Zachary Kuznia 2013-02-21 22:39:19 PST
Created attachment 189689 [details]
Patch
Comment 2 Zachary Kuznia 2013-02-21 22:40:16 PST
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
Comment 3 WebKit Review Bot 2013-02-21 22:53:18 PST
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 4 Adam Barth 2013-02-22 08:26:56 PST
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?
Comment 5 Adam Barth 2013-02-22 08:28:17 PST
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.
Comment 6 Adam Barth 2013-02-22 08:29:22 PST
Take a look at how IndexedDB throws exceptions:

http://www.w3.org/TR/IndexedDB/#exceptions
Comment 7 Zachary Kuznia 2013-02-22 17:22:47 PST
(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.