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

Unified Diff: Source/bindings/tests/results/V8TestNamedConstructor.cpp

Issue 24203002: Improve generated "Not enough arguments." TypeError exceptions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: FAIL. 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/bindings/tests/results/V8TestNamedConstructor.cpp
diff --git a/Source/bindings/tests/results/V8TestNamedConstructor.cpp b/Source/bindings/tests/results/V8TestNamedConstructor.cpp
index 34669c6fc2c4f73184e6db3a29e47fdab2d8c6bc..cfa7556ac2f66c7f401e5143ae821bfe69b0ff53 100644
--- a/Source/bindings/tests/results/V8TestNamedConstructor.cpp
+++ b/Source/bindings/tests/results/V8TestNamedConstructor.cpp
@@ -23,6 +23,7 @@
#include "RuntimeEnabledFeatures.h"
#include "V8Document.h"
+#include "bindings/v8/ExceptionMessages.h"
#include "bindings/v8/ExceptionState.h"
#include "bindings/v8/ScriptController.h"
#include "bindings/v8/V8Binding.h"
@@ -86,7 +87,7 @@ static void V8TestNamedConstructorConstructorCallback(const v8::FunctionCallback
toV8(document, args.Holder(), args.GetIsolate());
if (UNLIKELY(args.Length() < 1)) {
- throwNotEnoughArgumentsError(args.GetIsolate());
+ throwTypeError(ExceptionMessages::failedToExecute("NamedConstructor", "TestNamedConstructor", "1 argument required, but only " + String::number(args.Length()) + " present."), args.GetIsolate());
return;
}
ExceptionState es(args.GetIsolate());

Powered by Google App Engine
This is Rietveld 408576698