W3C home > Mailing lists > Public > public-audio@w3.org > July to September 2012

[Bug 17325] (ExceptionType): Undefined exception type

From: <bugzilla@jessica.w3.org>
Date: Thu, 26 Jul 2012 12:40:09 +0000
Message-Id: <E1SuNMP-0005Zw-Rd@jessica.w3.org>
To: public-audio@w3.org
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 July 2012 12:40:18 GMT