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

Unified Diff: src/messages.h

Issue 1099573002: Migrate error messages, part 4 (v8natives.js). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix wrong assertion Created 5 years, 8 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 | « src/harmony-spread.js ('k') | src/messages.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/messages.h
diff --git a/src/messages.h b/src/messages.h
index 9a31a2d1611f2f8ac499332fc35cecf458b15a42..132df769bf1e37ab19968a49d1d77f15c04d5926 100644
--- a/src/messages.h
+++ b/src/messages.h
@@ -88,34 +88,66 @@ class MessageHandler {
};
-#define MESSAGE_TEMPLATES(T) \
- /* Error */ \
- T(CyclicProto, "Cyclic __proto__ value") \
- /* TypeError */ \
- T(ApplyNonFunction, \
- "Function.prototype.apply was called on %, which is a % and not a " \
- "function") \
- T(CalledNonCallable, "% is not a function") \
- T(CannotConvertToPrimitive, "Cannot convert object to primitive value") \
- T(GeneratorRunning, "Generator is already running") \
- T(IncompatibleMethodReceiver, "Method % called on incompatible receiver %") \
- T(InstanceofFunctionExpected, \
- "Expecting a function in instanceof check, but got %") \
- T(InstanceofNonobjectProto, \
- "Function has non-object prototype '%' in instanceof check") \
- T(InvalidInOperatorUse, "Cannot use 'in' operator to search for '%' in %") \
- T(NotConstructor, "% is not a constructor") \
- T(PropertyNotFunction, "Property '%' of object % is not a function") \
- T(SymbolToPrimitive, \
- "Cannot convert a Symbol wrapper object to a primitive value") \
- T(SymbolToNumber, "Cannot convert a Symbol value to a number") \
- T(SymbolToString, "Cannot convert a Symbol value to a string") \
- T(UndefinedOrNullToObject, "Cannot convert undefined or null to object") \
- T(WithExpression, "% has no properties") \
- T(WrongArgs, "%: Arguments list has wrong type") \
- /* RangeError */ \
- T(StackOverflow, "Maximum call stack size exceeded") \
- /* EvalError */ \
+#define MESSAGE_TEMPLATES(T) \
+ /* Error */ \
+ T(CyclicProto, "Cyclic __proto__ value") \
+ /* TypeError */ \
+ T(ApplyNonFunction, \
+ "Function.prototype.apply was called on %, which is a % and not a " \
+ "function") \
+ T(CalledNonCallable, "% is not a function") \
+ T(CalledOnNonObject, "% called on non-object") \
+ T(CannotConvertToPrimitive, "Cannot convert object to primitive value") \
+ T(DefineDisallowed, "Cannot define property:%, object is not extensible.") \
+ T(GeneratorRunning, "Generator is already running") \
+ T(FunctionBind, "Bind must be called on a function") \
+ T(IncompatibleMethodReceiver, "Method % called on incompatible receiver %") \
+ T(InstanceofFunctionExpected, \
+ "Expecting a function in instanceof check, but got %") \
+ T(InstanceofNonobjectProto, \
+ "Function has non-object prototype '%' in instanceof check") \
+ T(InvalidInOperatorUse, "Cannot use 'in' operator to search for '%' in %") \
+ T(NotAnIterator, "% is not an iterator") \
+ T(NotConstructor, "% is not a constructor") \
+ T(NotGeneric, "% is not generic") \
+ T(NotIterable, "% is not iterable") \
+ T(ObjectGetterExpectingFunction, \
+ "Object.prototype.__defineGetter__: Expecting function") \
+ T(ObjectGetterCallable, "Getter must be a function: %") \
+ T(ObjectSetterExpectingFunction, \
+ "Object.prototype.__defineSetter__: Expecting function") \
+ T(ObjectSetterCallable, "Setter must be a function: %") \
+ T(PropertyDescObject, "Property description must be an object: %") \
+ T(PropertyNotFunction, "Property '%' of object % is not a function") \
+ T(ProtoObjectOrNull, "Object prototype may only be an Object or null: %") \
+ T(ProxyHandlerReturned, "Proxy handler % returned % from '%' trap") \
+ T(ProxyHandlerTrapMissing, "Proxy handler % has no '%' trap") \
+ T(ProxyHandlerTrapMustBeCallable, \
+ "Proxy handler %0 has non-callable '%' trap") \
+ T(ProxyNonObjectPropNames, "Trap '%' returned non-object %") \
+ T(ProxyRepeatedPropName, "Trap '%' returned repeated property name '%'") \
+ T(ProxyPropNotConfigurable, \
+ "Proxy handler % returned non-configurable descriptor for property '%' " \
+ "from '%' trap") \
+ T(RedefineDisallowed, "Cannot redefine property: %") \
+ T(SymbolToPrimitive, \
+ "Cannot convert a Symbol wrapper object to a primitive value") \
+ T(SymbolToNumber, "Cannot convert a Symbol value to a number") \
+ T(SymbolToString, "Cannot convert a Symbol value to a string") \
+ T(UndefinedOrNullToObject, "Cannot convert undefined or null to object") \
+ T(ValueAndAccessor, \
+ "Invalid property. A property cannot both have accessors and be " \
+ "writable or have a value, %") \
+ T(WithExpression, "% has no properties") \
+ T(WrongArgs, "%: Arguments list has wrong type") \
+ /* RangeError */ \
+ T(ArrayLengthOutOfRange, "defineProperty() array length out of range") \
+ T(NumberFormatRange, "% argument must be between 0 and 20") \
+ T(StackOverflow, "Maximum call stack size exceeded") \
+ T(ToPrecisionFormatRange, "toPrecision() argument must be between 1 and 21") \
+ /* SyntaxError */ \
+ T(ParenthesisInArgString, "Function arg string contains parenthesis") \
+ /* EvalError */ \
T(CodeGenFromStrings, "%")
class MessageTemplate {
« no previous file with comments | « src/harmony-spread.js ('k') | src/messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698