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

Unified Diff: Source/bindings/v8/ExceptionMessages.cpp

Issue 284163002: Better arity checks for overloads (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Return properly Created 6 years, 7 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
« no previous file with comments | « Source/bindings/v8/ExceptionMessages.h ('k') | Source/bindings/v8/V8Binding.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/ExceptionMessages.cpp
diff --git a/Source/bindings/v8/ExceptionMessages.cpp b/Source/bindings/v8/ExceptionMessages.cpp
index 6106e6d0d5a063eae70cc3143d5aeb90c11501df..c65e04703d4ec9fe889fba651139e02a5c4e85b9 100644
--- a/Source/bindings/v8/ExceptionMessages.cpp
+++ b/Source/bindings/v8/ExceptionMessages.cpp
@@ -91,6 +91,11 @@ String ExceptionMessages::incorrectPropertyType(const String& property, const St
return "The '" + property + "' property " + detail;
}
+String ExceptionMessages::invalidArity(const char* expected, unsigned provided)
+{
+ return "Valid arities are: " + String(expected) + ", but " + String::number(provided) + " arguments provided.";
+}
+
String ExceptionMessages::argumentNullOrIncorrectType(int argumentIndex, const String& expectedType)
{
return "The " + ordinalNumber(argumentIndex) + " argument provided is either null, or an invalid " + expectedType + " object.";
« no previous file with comments | « Source/bindings/v8/ExceptionMessages.h ('k') | Source/bindings/v8/V8Binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698