Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2022)

Unified Diff: Source/modules/webaudio/DelayNode.cpp

Issue 24877002: Add more informative messages for DOM exceptions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/modules/webaudio/DelayNode.cpp
diff --git a/Source/modules/webaudio/DelayNode.cpp b/Source/modules/webaudio/DelayNode.cpp
index b26e8ef211495d4199dc63a261dda3df68370255..85a74485e3c149f608848f9c7896789f1ab99cb2 100644
--- a/Source/modules/webaudio/DelayNode.cpp
+++ b/Source/modules/webaudio/DelayNode.cpp
@@ -28,6 +28,7 @@
#include "modules/webaudio/DelayNode.h"
+#include "bindings/v8/ExceptionMessages.h"
#include "bindings/v8/ExceptionState.h"
#include "core/dom/ExceptionCode.h"
@@ -40,7 +41,11 @@ DelayNode::DelayNode(AudioContext* context, float sampleRate, double maxDelayTim
{
ScriptWrappable::init(this);
if (maxDelayTime <= 0 || maxDelayTime >= maximumAllowedDelayTime) {
- es.throwUninformativeAndGenericDOMException(NotSupportedError);
+ es.throwDOMException(
+ NotSupportedError,
+ ExceptionMessages::failedToConstruct(
+ "DelayNode",
+ "invalid max delay time."));
Mike West 2013/09/27 06:44:39 Same as above.
return;
}
m_processor = adoptPtr(new DelayProcessor(context, sampleRate, 1, maxDelayTime));

Powered by Google App Engine
This is Rietveld 408576698