Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(ExceptionType): Undefined exception type #106

Closed
olivierthereaux opened this issue Sep 11, 2013 · 8 comments
Closed

(ExceptionType): Undefined exception type #106

olivierthereaux opened this issue Sep 11, 2013 · 8 comments

Comments

@olivierthereaux
Copy link
Contributor

Originally reported on W3C Bugzilla ISSUE-17325 Tue, 05 Jun 2012 11:17:32 GMT
Reported by Philip Jägenstedt
Assigned to

Audio-ISSUE-22 (ExceptionType): Undefined exception type [Web Audio API]

http://www.w3.org/2011/audio/track/issues/22

Raised by: Philip Jägenstedt
On product: Web Audio API

The phrase "An exception will be thrown" is used throughout the spec, but the specific exception that should be throw is never defined.

@olivierthereaux
Copy link
Contributor Author

Original comment by Olivier Thereaux on W3C Bugzilla. Thu, 07 Jun 2012 15:51:18 GMT

Comment from Chris Rogers, 18 May 2012

«I'm unfamiliar with common convention for "what type" of exceptions will be thrown. I'm happy to add them according to your exact recommendations»

@olivierthereaux
Copy link
Contributor Author

Original comment by Philip Jägenstedt on W3C Bugzilla. Thu, 26 Jul 2012 12:40:09 GMT

The createBuffer method could be written as:

If numberOfChannels is greater than 32, if sampleRate is less than 22050 or if sampleRate is greater than 96000, then throw an IndexSizeError. Otherwise, return a new AudioBuffer with sampleRate sampleRate, length length, numberOfChannels numberOfChannels, where all samples have the value 0.

IndexSizeError works for most of these range-checks. For noteOn and other places that check state, InvalidStateError is appropriate.

If exceptions are ever thrown in an algorithm with multiple steps, the magic words "and terminate these steps" must be included as noted in http://wiki.whatwg.org/wiki/Howto_spec#Dealing_with_exceptions

@olivierthereaux
Copy link
Contributor Author

Original comment by Olivier Thereaux on W3C Bugzilla. Fri, 08 Feb 2013 13:51:21 GMT

This issue has been stalled for a while - it was once assigned to Philip but he is set to be away for a while. Ehsan, is that something you could look into?

@olivierthereaux
Copy link
Contributor Author

Original comment by Ehsan Akhgari [:ehsan] on W3C Bugzilla. Sun, 17 Feb 2013 22:38:29 GMT

If that's OK with Chris, sure!

@olivierthereaux
Copy link
Contributor Author

Original comment by Chris Rogers on W3C Bugzilla. Mon, 18 Feb 2013 00:40:26 GMT

(In reply to comment #4)

If that's OK with Chris, sure!

sounds good to me

@olivierthereaux
Copy link
Contributor Author

Original comment by paul@paul.cx on W3C Bugzilla. Fri, 06 Sep 2013 14:45:42 GMT

*** Bug 19901 has been marked as a duplicate of this bug. ***

@olivierthereaux
Copy link
Contributor Author

Original comment by paul@paul.cx on W3C Bugzilla. Mon, 09 Sep 2013 13:09:57 GMT

I've been pushing a patch [1] to address this problem, please complain if you think that we should throw different exceptions.

[1] 50ad9b6

@cwilso
Copy link
Contributor

cwilso commented Oct 29, 2014

These have been incorporated.

@cwilso cwilso closed this as completed Oct 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants