[Bug 17325] (ExceptionType): Undefined exception type

https://www.w3.org/Bugs/Public/show_bug.cgi?id=17325

--- Comment #2 from Philip J <philipj@opera.com> 2012-07-26 12:40:09 UTC ---
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

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Received on Thursday, 26 July 2012 12:40:16 UTC