-
Notifications
You must be signed in to change notification settings - Fork 167
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
Comments
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» |
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 |
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? |
If that's OK with Chris, sure! |
(In reply to comment #4)
sounds good to me |
*** Bug 19901 has been marked as a duplicate of this bug. *** |
I've been pushing a patch [1] to address this problem, please complain if you think that we should throw different exceptions. [1] 50ad9b6 |
These have been incorporated. |
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.
The text was updated successfully, but these errors were encountered: