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

Side by Side Diff: src/messages.h

Issue 1126043004: Migrate error messages, part 10. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixed and rebased Created 5 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 unified diff | Download patch
« no previous file with comments | « src/json-stringifier.h ('k') | src/messages.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // The infrastructure used for (localized) message reporting in V8. 5 // The infrastructure used for (localized) message reporting in V8.
6 // 6 //
7 // Note: there's a big unresolved issue about ownership of the data 7 // Note: there's a big unresolved issue about ownership of the data
8 // structures used by this framework. 8 // structures used by this framework.
9 9
10 #ifndef V8_MESSAGES_H_ 10 #ifndef V8_MESSAGES_H_
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 T(ApplyNonFunction, \ 124 T(ApplyNonFunction, \
125 "Function.prototype.apply was called on %, which is a % and not a " \ 125 "Function.prototype.apply was called on %, which is a % and not a " \
126 "function") \ 126 "function") \
127 T(ArrayFunctionsOnFrozen, "Cannot modify frozen array elements") \ 127 T(ArrayFunctionsOnFrozen, "Cannot modify frozen array elements") \
128 T(ArrayFunctionsOnSealed, "Cannot add/remove sealed array elements") \ 128 T(ArrayFunctionsOnSealed, "Cannot add/remove sealed array elements") \
129 T(ArrayNotSubclassable, "Subclassing Arrays is not currently supported.") \ 129 T(ArrayNotSubclassable, "Subclassing Arrays is not currently supported.") \
130 T(CalledNonCallable, "% is not a function") \ 130 T(CalledNonCallable, "% is not a function") \
131 T(CalledOnNonObject, "% called on non-object") \ 131 T(CalledOnNonObject, "% called on non-object") \
132 T(CalledOnNullOrUndefined, "% called on null or undefined") \ 132 T(CalledOnNullOrUndefined, "% called on null or undefined") \
133 T(CannotConvertToPrimitive, "Cannot convert object to primitive value") \ 133 T(CannotConvertToPrimitive, "Cannot convert object to primitive value") \
134 T(CannotPreventExtExternalArray, \
135 "Cannot prevent extension of an object with external array elements") \
136 T(CircularStructure, "Converting circular structure to JSON") \
137 T(ConstAssign, "Assignment to constant variable.") \
134 T(ConstructorNonCallable, \ 138 T(ConstructorNonCallable, \
135 "Class constructors cannot be invoked without 'new'") \ 139 "Class constructors cannot be invoked without 'new'") \
136 T(ConstructorNotFunction, "Constructor % requires 'new'") \ 140 T(ConstructorNotFunction, "Constructor % requires 'new'") \
137 T(CurrencyCode, "Currency code is required with currency style.") \ 141 T(CurrencyCode, "Currency code is required with currency style.") \
138 T(DataViewNotArrayBuffer, \ 142 T(DataViewNotArrayBuffer, \
139 "First argument to DataView constructor must be an ArrayBuffer") \ 143 "First argument to DataView constructor must be an ArrayBuffer") \
140 T(DateType, "this is not a Date object.") \ 144 T(DateType, "this is not a Date object.") \
141 T(DefineDisallowed, "Cannot define property:%, object is not extensible.") \ 145 T(DefineDisallowed, "Cannot define property:%, object is not extensible.") \
146 T(DuplicateTemplateProperty, "Object template has duplicate property '%'") \
147 T(ExtendsValueGenerator, \
148 "Class extends value % may not be a generator function") \
149 T(ExtendsValueNotFunction, \
150 "Class extends value % is not a function or null") \
142 T(FirstArgumentNotRegExp, \ 151 T(FirstArgumentNotRegExp, \
143 "First argument to % must not be a regular expression") \ 152 "First argument to % must not be a regular expression") \
144 T(FlagsGetterNonObject, \ 153 T(FlagsGetterNonObject, \
145 "RegExp.prototype.flags getter called on non-object %") \ 154 "RegExp.prototype.flags getter called on non-object %") \
146 T(FunctionBind, "Bind must be called on a function") \ 155 T(FunctionBind, "Bind must be called on a function") \
147 T(GeneratorRunning, "Generator is already running") \ 156 T(GeneratorRunning, "Generator is already running") \
157 T(IllegalInvocation, "Illegal invocation") \
148 T(IncompatibleMethodReceiver, "Method % called on incompatible receiver %") \ 158 T(IncompatibleMethodReceiver, "Method % called on incompatible receiver %") \
149 T(InstanceofFunctionExpected, \ 159 T(InstanceofFunctionExpected, \
150 "Expecting a function in instanceof check, but got %") \ 160 "Expecting a function in instanceof check, but got %") \
151 T(InstanceofNonobjectProto, \ 161 T(InstanceofNonobjectProto, \
152 "Function has non-object prototype '%' in instanceof check") \ 162 "Function has non-object prototype '%' in instanceof check") \
153 T(InvalidArgument, "invalid_argument") \ 163 T(InvalidArgument, "invalid_argument") \
154 T(InvalidInOperatorUse, "Cannot use 'in' operator to search for '%' in %") \ 164 T(InvalidInOperatorUse, "Cannot use 'in' operator to search for '%' in %") \
155 T(IteratorResultNotAnObject, "Iterator result % is not an object") \ 165 T(IteratorResultNotAnObject, "Iterator result % is not an object") \
156 T(IteratorValueNotAnObject, "Iterator value % is not an entry object") \ 166 T(IteratorValueNotAnObject, "Iterator value % is not an entry object") \
157 T(LanguageID, "Language ID should be string or object.") \ 167 T(LanguageID, "Language ID should be string or object.") \
158 T(MethodCalledOnWrongObject, \ 168 T(MethodCalledOnWrongObject, \
159 "Method % called on a non-object or on a wrong type of object.") \ 169 "Method % called on a non-object or on a wrong type of object.") \
160 T(MethodInvokedOnNullOrUndefined, \ 170 T(MethodInvokedOnNullOrUndefined, \
161 "Method invoked on undefined or null value.") \ 171 "Method invoked on undefined or null value.") \
162 T(MethodInvokedOnWrongType, "Method invoked on an object that is not %.") \ 172 T(MethodInvokedOnWrongType, "Method invoked on an object that is not %.") \
173 T(NonExtensibleProto, "% is not extensible") \
174 T(NonObjectPropertyLoad, "Cannot read property '%' of %") \
175 T(NonObjectPropertyStore, "Cannot set property '%' of %") \
176 T(NoSetterInCallback, "Cannot set property % of % which has only a getter") \
163 T(NotAnIterator, "% is not an iterator") \ 177 T(NotAnIterator, "% is not an iterator") \
164 T(NotAPromise, "% is not a promise") \ 178 T(NotAPromise, "% is not a promise") \
165 T(NotConstructor, "% is not a constructor") \ 179 T(NotConstructor, "% is not a constructor") \
180 T(NotDateObject, "this is not a Date object.") \
181 T(NotIntlObject, "% is not an i18n object.") \
166 T(NotGeneric, "% is not generic") \ 182 T(NotGeneric, "% is not generic") \
167 T(NotIterable, "% is not iterable") \ 183 T(NotIterable, "% is not iterable") \
168 T(NotTypedArray, "this is not a typed array.") \ 184 T(NotTypedArray, "this is not a typed array.") \
169 T(ObjectGetterExpectingFunction, \ 185 T(ObjectGetterExpectingFunction, \
170 "Object.prototype.__defineGetter__: Expecting function") \ 186 "Object.prototype.__defineGetter__: Expecting function") \
171 T(ObjectGetterCallable, "Getter must be a function: %") \ 187 T(ObjectGetterCallable, "Getter must be a function: %") \
188 T(ObjectNotExtensible, "Can't add property %, object is not extensible") \
172 T(ObjectSetterExpectingFunction, \ 189 T(ObjectSetterExpectingFunction, \
173 "Object.prototype.__defineSetter__: Expecting function") \ 190 "Object.prototype.__defineSetter__: Expecting function") \
174 T(ObjectSetterCallable, "Setter must be a function: %") \ 191 T(ObjectSetterCallable, "Setter must be a function: %") \
175 T(ObserveCallbackFrozen, \ 192 T(ObserveCallbackFrozen, \
176 "Object.observe cannot deliver to a frozen function object") \ 193 "Object.observe cannot deliver to a frozen function object") \
177 T(ObserveGlobalProxy, "% cannot be called on the global proxy object") \ 194 T(ObserveGlobalProxy, "% cannot be called on the global proxy object") \
178 T(ObserveInvalidAccept, \ 195 T(ObserveInvalidAccept, \
179 "Third argument to Object.observe must be an array of strings.") \ 196 "Third argument to Object.observe must be an array of strings.") \
180 T(ObserveNonFunction, "Object.% cannot deliver to non-function") \ 197 T(ObserveNonFunction, "Object.% cannot deliver to non-function") \
181 T(ObserveNonObject, "Object.% cannot % non-object") \ 198 T(ObserveNonObject, "Object.% cannot % non-object") \
182 T(ObserveNotifyNonNotifier, "notify called on non-notifier object") \ 199 T(ObserveNotifyNonNotifier, "notify called on non-notifier object") \
183 T(ObservePerformNonFunction, "Cannot perform non-function") \ 200 T(ObservePerformNonFunction, "Cannot perform non-function") \
184 T(ObservePerformNonString, "Invalid non-string changeType") \ 201 T(ObservePerformNonString, "Invalid non-string changeType") \
185 T(ObserveTypeNonString, \ 202 T(ObserveTypeNonString, \
186 "Invalid changeRecord with non-string 'type' property") \ 203 "Invalid changeRecord with non-string 'type' property") \
187 T(OrdinaryFunctionCalledAsConstructor, \ 204 T(OrdinaryFunctionCalledAsConstructor, \
188 "Function object that's not a constructor was created with new") \ 205 "Function object that's not a constructor was created with new") \
189 T(PromiseCyclic, "Chaining cycle detected for promise %") \ 206 T(PromiseCyclic, "Chaining cycle detected for promise %") \
190 T(PropertyDescObject, "Property description must be an object: %") \ 207 T(PropertyDescObject, "Property description must be an object: %") \
191 T(PropertyNotFunction, "Property '%' of object % is not a function") \ 208 T(PropertyNotFunction, "Property '%' of object % is not a function") \
192 T(ProtoObjectOrNull, "Object prototype may only be an Object or null: %") \ 209 T(ProtoObjectOrNull, "Object prototype may only be an Object or null: %") \
210 T(PrototypeParentNotAnObject, \
211 "Class extends value does not have valid prototype property %") \
212 T(ProxyHandlerDeleteFailed, \
213 "Proxy handler % did not return a boolean value from 'delete' trap") \
193 T(ProxyHandlerNonObject, "Proxy.% called with non-object as handler") \ 214 T(ProxyHandlerNonObject, "Proxy.% called with non-object as handler") \
194 T(ProxyHandlerReturned, "Proxy handler % returned % from '%' trap") \ 215 T(ProxyHandlerReturned, "Proxy handler % returned % from '%' trap") \
195 T(ProxyHandlerTrapMissing, "Proxy handler % has no '%' trap") \ 216 T(ProxyHandlerTrapMissing, "Proxy handler % has no '%' trap") \
196 T(ProxyHandlerTrapMustBeCallable, \ 217 T(ProxyHandlerTrapMustBeCallable, \
197 "Proxy handler %0 has non-callable '%' trap") \ 218 "Proxy handler %0 has non-callable '%' trap") \
198 T(ProxyNonObjectPropNames, "Trap '%' returned non-object %") \ 219 T(ProxyNonObjectPropNames, "Trap '%' returned non-object %") \
199 T(ProxyProtoNonObject, "Proxy.create called with no-object as prototype") \ 220 T(ProxyProtoNonObject, "Proxy.create called with no-object as prototype") \
200 T(ProxyPropNotConfigurable, \ 221 T(ProxyPropNotConfigurable, \
201 "Proxy handler % returned non-configurable descriptor for property '%' " \ 222 "Proxy handler % returned non-configurable descriptor for property '%' " \
202 "from '%' trap") \ 223 "from '%' trap") \
203 T(ProxyRepeatedPropName, "Trap '%' returned repeated property name '%'") \ 224 T(ProxyRepeatedPropName, "Trap '%' returned repeated property name '%'") \
204 T(ProxyTrapFunctionExpected, \ 225 T(ProxyTrapFunctionExpected, \
205 "Proxy.createFunction called with non-function for '%' trap") \ 226 "Proxy.createFunction called with non-function for '%' trap") \
206 T(RedefineDisallowed, "Cannot redefine property: %") \ 227 T(RedefineDisallowed, "Cannot redefine property: %") \
228 T(RedefineExternalArray, \
229 "Cannot redefine a property of an object with external array elements") \
207 T(ReduceNoInitial, "Reduce of empty array with no initial value") \ 230 T(ReduceNoInitial, "Reduce of empty array with no initial value") \
208 T(ReinitializeIntl, "Trying to re-initialize % object.") \ 231 T(ReinitializeIntl, "Trying to re-initialize % object.") \
209 T(ResolvedOptionsCalledOnNonObject, \ 232 T(ResolvedOptionsCalledOnNonObject, \
210 "resolvedOptions method called on a non-object or on a object that is " \ 233 "resolvedOptions method called on a non-object or on a object that is " \
211 "not Intl.%.") \ 234 "not Intl.%.") \
212 T(ResolverNotAFunction, "Promise resolver % is not a function") \ 235 T(ResolverNotAFunction, "Promise resolver % is not a function") \
236 T(RestrictedFunctionProperties, \
237 "'caller' and 'arguments' are restricted function properties and cannot " \
238 "be accessed in this context.") \
239 T(StaticPrototype, "Classes may not have static property named prototype") \
240 T(StrictCannotAssign, "Cannot assign to read only '% in strict mode") \
241 T(StrictDeleteProperty, "Cannot delete property '%' of %") \
242 T(StrictPoisonPill, \
243 "'caller', 'callee', and 'arguments' properties may not be accessed on " \
244 "strict mode functions or the arguments objects for calls to them") \
245 T(StrictReadOnlyProperty, "Cannot assign to read only property '%' of %") \
246 T(StrongArity, \
247 "In strong mode, calling a function with too few arguments is deprecated") \
248 T(StrongImplicitCast, "In strong mode, implicit conversions are deprecated") \
213 T(SymbolToPrimitive, \ 249 T(SymbolToPrimitive, \
214 "Cannot convert a Symbol wrapper object to a primitive value") \ 250 "Cannot convert a Symbol wrapper object to a primitive value") \
215 T(SymbolToNumber, "Cannot convert a Symbol value to a number") \ 251 T(SymbolToNumber, "Cannot convert a Symbol value to a number") \
216 T(SymbolToString, "Cannot convert a Symbol value to a string") \ 252 T(SymbolToString, "Cannot convert a Symbol value to a string") \
217 T(UndefinedOrNullToObject, "Cannot convert undefined or null to object") \ 253 T(UndefinedOrNullToObject, "Cannot convert undefined or null to object") \
218 T(ValueAndAccessor, \ 254 T(ValueAndAccessor, \
219 "Invalid property. A property cannot both have accessors and be " \ 255 "Invalid property. A property cannot both have accessors and be " \
220 "writable or have a value, %") \ 256 "writable or have a value, %") \
257 T(VarRedeclaration, "Identifier '%' has already been declared") \
221 T(WithExpression, "% has no properties") \ 258 T(WithExpression, "% has no properties") \
222 T(WrongArgs, "%: Arguments list has wrong type") \ 259 T(WrongArgs, "%: Arguments list has wrong type") \
223 /* ReferenceError */ \ 260 /* ReferenceError */ \
224 T(NonMethod, "'super' is referenced from non-method") \ 261 T(NonMethod, "'super' is referenced from non-method") \
225 T(NotDefined, "% is not defined") \ 262 T(NotDefined, "% is not defined") \
226 T(UnsupportedSuper, "Unsupported reference to 'super'") \ 263 T(UnsupportedSuper, "Unsupported reference to 'super'") \
227 /* RangeError */ \ 264 /* RangeError */ \
228 T(ArrayLengthOutOfRange, "defineProperty() array length out of range") \ 265 T(ArrayLengthOutOfRange, "defineProperty() array length out of range") \
229 T(DateRange, "Provided date is not in valid range.") \ 266 T(DateRange, "Provided date is not in valid range.") \
230 T(ExpectedLocation, "Expected Area/Location for time zone, got %") \ 267 T(ExpectedLocation, "Expected Area/Location for time zone, got %") \
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 }; 308 };
272 309
273 static MaybeHandle<String> FormatMessage(int template_index, 310 static MaybeHandle<String> FormatMessage(int template_index,
274 Handle<String> arg0, 311 Handle<String> arg0,
275 Handle<String> arg1, 312 Handle<String> arg1,
276 Handle<String> arg2); 313 Handle<String> arg2);
277 }; 314 };
278 } } // namespace v8::internal 315 } } // namespace v8::internal
279 316
280 #endif // V8_MESSAGES_H_ 317 #endif // V8_MESSAGES_H_
OLDNEW
« no previous file with comments | « src/json-stringifier.h ('k') | src/messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698