Chromium Code Reviews| Index: Source/modules/webaudio/AudioBuffer.cpp |
| diff --git a/Source/modules/webaudio/AudioBuffer.cpp b/Source/modules/webaudio/AudioBuffer.cpp |
| index e41ba22063db137dd7ad7ee09439bec5b09c7465..ab9b5541c9a45beb51284a93e416d4c230591eee 100644 |
| --- a/Source/modules/webaudio/AudioBuffer.cpp |
| +++ b/Source/modules/webaudio/AudioBuffer.cpp |
| @@ -32,6 +32,7 @@ |
| #include "modules/webaudio/AudioBuffer.h" |
| +#include "bindings/v8/ExceptionMessages.h" |
| #include "bindings/v8/ExceptionState.h" |
| #include "core/dom/ExceptionCode.h" |
| #include "core/platform/audio/AudioBus.h" |
| @@ -97,7 +98,12 @@ void AudioBuffer::releaseMemory() |
| PassRefPtr<Float32Array> AudioBuffer::getChannelData(unsigned channelIndex, ExceptionState& es) |
| { |
| if (channelIndex >= m_channels.size()) { |
| - es.throwUninformativeAndGenericDOMException(SyntaxError); |
| + es.throwDOMException( |
| + SyntaxError, |
| + ExceptionMessages::failedToGet( |
| + "getChannelData", |
|
Mike West
2013/09/27 06:44:39
If this is called as `ab.getChannelData()`, then I
|
| + "AudioBuffer", |
| + "invalid channel index.")); |
|
Mike West
2013/09/27 06:44:39
How about "The provided index (" + String::number(
|
| return 0; |
| } |