Index: Source/modules/webaudio/AnalyserNode.cpp |
diff --git a/Source/modules/webaudio/AnalyserNode.cpp b/Source/modules/webaudio/AnalyserNode.cpp |
index 128840ef9b0e2787c49a12668f9f3992613f2fc4..e8383019ab719c79e6f7178c29562e74e6c27bec 100644 |
--- a/Source/modules/webaudio/AnalyserNode.cpp |
+++ b/Source/modules/webaudio/AnalyserNode.cpp |
@@ -28,6 +28,7 @@ |
#include "modules/webaudio/AnalyserNode.h" |
+#include "bindings/v8/ExceptionMessages.h" |
#include "bindings/v8/ExceptionState.h" |
#include "core/dom/ExceptionCode.h" |
#include "modules/webaudio/AudioNodeInput.h" |
@@ -75,8 +76,17 @@ void AnalyserNode::reset() |
void AnalyserNode::setFftSize(unsigned size, ExceptionState& es) |
{ |
- if (!m_analyser.setFftSize(size)) |
- es.throwUninformativeAndGenericDOMException(NotSupportedError); |
+ if (!m_analyser.setFftSize(size)) { |
+ es.throwDOMException( |
+ NotSupportedError, |
+ ExceptionMessages::failedToSet( |
+ "fftSize", |
+ "AnalyserNode", |
+ "FFT size (" + String::number(size) |
+ + ") must be a power of two between " |
+ + String::number(RealtimeAnalyser::MinFFTSize) + " and " |
+ + String::number(RealtimeAnalyser::MaxFFTSize) + ", inclusive")); |
+ } |
} |
} // namespace WebCore |