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

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

Issue 23440058: Improve generated TypeError exception messages in bindings. (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/bindings/tests/results/V8TestNode.cpp
diff --git a/Source/bindings/tests/results/V8TestNode.cpp b/Source/bindings/tests/results/V8TestNode.cpp
index 0e6235c88f19d4da928472de6f5429c3edaf4430..57275a02dfe651f1e38ccf68e0a78147c212da60 100644
--- a/Source/bindings/tests/results/V8TestNode.cpp
+++ b/Source/bindings/tests/results/V8TestNode.cpp
@@ -23,6 +23,7 @@
#include "RuntimeEnabledFeatures.h"
#include "V8Node.h"
+#include "bindings/v8/ExceptionMessages.h"
#include "bindings/v8/ScriptController.h"
#include "bindings/v8/V8Binding.h"
#include "bindings/v8/V8DOMConfiguration.h"
@@ -77,7 +78,7 @@ void V8TestNode::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&
{
TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor");
if (!args.IsConstructCall()) {
- throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate());
+ throwTypeError(ExceptionMessages::failedToConstruct("TestNode", "Please use the 'new' operator, this DOM object constructor cannot be called as a function."), args.GetIsolate());
return;
}
« no previous file with comments | « Source/bindings/tests/results/V8TestNamedConstructor.cpp ('k') | Source/bindings/tests/results/V8TestObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698