OLD | NEW |
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 T(DebuggerLoading, "Error loading debugger") \ | 80 T(DebuggerLoading, "Error loading debugger") \ |
81 T(DefaultOptionsMissing, "Internal % error. Default options are missing.") \ | 81 T(DefaultOptionsMissing, "Internal % error. Default options are missing.") \ |
82 T(UncaughtException, "Uncaught %") \ | 82 T(UncaughtException, "Uncaught %") \ |
83 T(Unsupported, "Not supported") \ | 83 T(Unsupported, "Not supported") \ |
84 T(WrongServiceType, "Internal error, wrong service type: %") \ | 84 T(WrongServiceType, "Internal error, wrong service type: %") \ |
85 T(WrongValueType, "Internal error. Wrong value type.") \ | 85 T(WrongValueType, "Internal error. Wrong value type.") \ |
86 /* TypeError */ \ | 86 /* TypeError */ \ |
87 T(ApplyNonFunction, \ | 87 T(ApplyNonFunction, \ |
88 "Function.prototype.apply was called on %, which is a % and not a " \ | 88 "Function.prototype.apply was called on %, which is a % and not a " \ |
89 "function") \ | 89 "function") \ |
| 90 T(ArrayBufferTooShort, \ |
| 91 "Derived ArrayBuffer constructor created a buffer which was too small") \ |
| 92 T(ArrayBufferSpeciesThis, \ |
| 93 "ArrayBuffer subclass returned this from species constructor") \ |
90 T(ArrayFunctionsOnFrozen, "Cannot modify frozen array elements") \ | 94 T(ArrayFunctionsOnFrozen, "Cannot modify frozen array elements") \ |
91 T(ArrayFunctionsOnSealed, "Cannot add/remove sealed array elements") \ | 95 T(ArrayFunctionsOnSealed, "Cannot add/remove sealed array elements") \ |
92 T(ArrayNotSubclassable, "Subclassing Arrays is not currently supported.") \ | 96 T(ArrayNotSubclassable, "Subclassing Arrays is not currently supported.") \ |
93 T(CalledNonCallable, "% is not a function") \ | 97 T(CalledNonCallable, "% is not a function") \ |
94 T(CalledOnNonObject, "% called on non-object") \ | 98 T(CalledOnNonObject, "% called on non-object") \ |
95 T(CalledOnNullOrUndefined, "% called on null or undefined") \ | 99 T(CalledOnNullOrUndefined, "% called on null or undefined") \ |
96 T(CallSiteExpectsFunction, \ | 100 T(CallSiteExpectsFunction, \ |
97 "CallSite expects function as second argument, got %") \ | 101 "CallSite expects function as second argument, got %") \ |
98 T(CannotConvertToPrimitive, "Cannot convert object to primitive value") \ | 102 T(CannotConvertToPrimitive, "Cannot convert object to primitive value") \ |
99 T(CannotPreventExt, "Cannot prevent extensions") \ | 103 T(CannotPreventExt, "Cannot prevent extensions") \ |
100 T(CannotFreezeArrayBufferView, \ | 104 T(CannotFreezeArrayBufferView, \ |
101 "Cannot freeze array buffer views with elements") \ | 105 "Cannot freeze array buffer views with elements") \ |
102 T(CircularStructure, "Converting circular structure to JSON") \ | 106 T(CircularStructure, "Converting circular structure to JSON") \ |
103 T(ConstructAbstractClass, "Abstract class % not directly constructable") \ | 107 T(ConstructAbstractClass, "Abstract class % not directly constructable") \ |
104 T(ConstAssign, "Assignment to constant variable.") \ | 108 T(ConstAssign, "Assignment to constant variable.") \ |
105 T(ConstructorNonCallable, \ | 109 T(ConstructorNonCallable, \ |
106 "Class constructor % cannot be invoked without 'new'") \ | 110 "Class constructor % cannot be invoked without 'new'") \ |
107 T(ConstructorNotFunction, "Constructor % requires 'new'") \ | 111 T(ConstructorNotFunction, "Constructor % requires 'new'") \ |
| 112 T(ConstructorNotReceiver, "The .constructor property is not an object") \ |
108 T(CurrencyCode, "Currency code is required with currency style.") \ | 113 T(CurrencyCode, "Currency code is required with currency style.") \ |
109 T(DataViewNotArrayBuffer, \ | 114 T(DataViewNotArrayBuffer, \ |
110 "First argument to DataView constructor must be an ArrayBuffer") \ | 115 "First argument to DataView constructor must be an ArrayBuffer") \ |
111 T(DateType, "this is not a Date object.") \ | 116 T(DateType, "this is not a Date object.") \ |
112 T(DebuggerFrame, "Debugger: Invalid frame index.") \ | 117 T(DebuggerFrame, "Debugger: Invalid frame index.") \ |
113 T(DebuggerType, "Debugger: Parameters have wrong types.") \ | 118 T(DebuggerType, "Debugger: Parameters have wrong types.") \ |
114 T(DeclarationMissingInitializer, "Missing initializer in % declaration") \ | 119 T(DeclarationMissingInitializer, "Missing initializer in % declaration") \ |
115 T(DefineDisallowed, "Cannot define property:%, object is not extensible.") \ | 120 T(DefineDisallowed, "Cannot define property:%, object is not extensible.") \ |
116 T(DuplicateTemplateProperty, "Object template has duplicate property '%'") \ | 121 T(DuplicateTemplateProperty, "Object template has duplicate property '%'") \ |
117 T(ExtendsValueGenerator, \ | 122 T(ExtendsValueGenerator, \ |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 T(RegExpNonRegExp, "% getter called on non-RegExp object") \ | 289 T(RegExpNonRegExp, "% getter called on non-RegExp object") \ |
285 T(ReinitializeIntl, "Trying to re-initialize % object.") \ | 290 T(ReinitializeIntl, "Trying to re-initialize % object.") \ |
286 T(ResolvedOptionsCalledOnNonObject, \ | 291 T(ResolvedOptionsCalledOnNonObject, \ |
287 "resolvedOptions method called on a non-object or on a object that is " \ | 292 "resolvedOptions method called on a non-object or on a object that is " \ |
288 "not Intl.%.") \ | 293 "not Intl.%.") \ |
289 T(ResolverNotAFunction, "Promise resolver % is not a function") \ | 294 T(ResolverNotAFunction, "Promise resolver % is not a function") \ |
290 T(RestrictedFunctionProperties, \ | 295 T(RestrictedFunctionProperties, \ |
291 "'caller' and 'arguments' are restricted function properties and cannot " \ | 296 "'caller' and 'arguments' are restricted function properties and cannot " \ |
292 "be accessed in this context.") \ | 297 "be accessed in this context.") \ |
293 T(StaticPrototype, "Classes may not have static property named prototype") \ | 298 T(StaticPrototype, "Classes may not have static property named prototype") \ |
294 T(StrictCannotAssign, "Cannot assign to read only '% in strict mode") \ | 299 T(StrictCannotAssign, "Cannot assign to read only '%' in strict mode") \ |
295 T(StrictDeleteProperty, "Cannot delete property '%' of %") \ | 300 T(StrictDeleteProperty, "Cannot delete property '%' of %") \ |
296 T(StrictPoisonPill, \ | 301 T(StrictPoisonPill, \ |
297 "'caller', 'callee', and 'arguments' properties may not be accessed on " \ | 302 "'caller', 'callee', and 'arguments' properties may not be accessed on " \ |
298 "strict mode functions or the arguments objects for calls to them") \ | 303 "strict mode functions or the arguments objects for calls to them") \ |
299 T(StrictReadOnlyProperty, \ | 304 T(StrictReadOnlyProperty, \ |
300 "Cannot assign to read only property '%' of % '%'") \ | 305 "Cannot assign to read only property '%' of % '%'") \ |
301 T(StrictCannotCreateProperty, "Cannot create property '%' on % '%'") \ | 306 T(StrictCannotCreateProperty, "Cannot create property '%' on % '%'") \ |
302 T(StrongArity, \ | 307 T(StrongArity, \ |
303 "In strong mode, calling a function with too few arguments is deprecated") \ | 308 "In strong mode, calling a function with too few arguments is deprecated") \ |
304 T(StrongDeleteProperty, \ | 309 T(StrongDeleteProperty, \ |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 T(StrongVar, \ | 485 T(StrongVar, \ |
481 "In strong mode, 'var' is deprecated, use 'let' or 'const' instead") \ | 486 "In strong mode, 'var' is deprecated, use 'let' or 'const' instead") \ |
482 T(TemplateOctalLiteral, \ | 487 T(TemplateOctalLiteral, \ |
483 "Octal literals are not allowed in template strings.") \ | 488 "Octal literals are not allowed in template strings.") \ |
484 T(ThisFormalParameter, "'this' is not a valid formal parameter name") \ | 489 T(ThisFormalParameter, "'this' is not a valid formal parameter name") \ |
485 T(TooManyArguments, \ | 490 T(TooManyArguments, \ |
486 "Too many arguments in function call (only 65535 allowed)") \ | 491 "Too many arguments in function call (only 65535 allowed)") \ |
487 T(TooManyParameters, \ | 492 T(TooManyParameters, \ |
488 "Too many parameters in function definition (only 65535 allowed)") \ | 493 "Too many parameters in function definition (only 65535 allowed)") \ |
489 T(TooManyVariables, "Too many variables declared (only 4194303 allowed)") \ | 494 T(TooManyVariables, "Too many variables declared (only 4194303 allowed)") \ |
| 495 T(TypedArrayTooShort, \ |
| 496 "Derived TypedArray constructor created an array which was too small") \ |
490 T(UnexpectedEOS, "Unexpected end of input") \ | 497 T(UnexpectedEOS, "Unexpected end of input") \ |
491 T(UnexpectedReserved, "Unexpected reserved word") \ | 498 T(UnexpectedReserved, "Unexpected reserved word") \ |
492 T(UnexpectedStrictReserved, "Unexpected strict mode reserved word") \ | 499 T(UnexpectedStrictReserved, "Unexpected strict mode reserved word") \ |
493 T(UnexpectedSuper, "'super' keyword unexpected here") \ | 500 T(UnexpectedSuper, "'super' keyword unexpected here") \ |
494 T(UnexpectedNewTarget, "new.target expression is not allowed here") \ | 501 T(UnexpectedNewTarget, "new.target expression is not allowed here") \ |
495 T(UnexpectedTemplateString, "Unexpected template string") \ | 502 T(UnexpectedTemplateString, "Unexpected template string") \ |
496 T(UnexpectedToken, "Unexpected token %") \ | 503 T(UnexpectedToken, "Unexpected token %") \ |
497 T(UnexpectedTokenIdentifier, "Unexpected identifier") \ | 504 T(UnexpectedTokenIdentifier, "Unexpected identifier") \ |
498 T(UnexpectedTokenNumber, "Unexpected number") \ | 505 T(UnexpectedTokenNumber, "Unexpected number") \ |
499 T(UnexpectedTokenString, "Unexpected string") \ | 506 T(UnexpectedTokenString, "Unexpected string") \ |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); | 555 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); |
549 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, | 556 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, |
550 Handle<Object> data); | 557 Handle<Object> data); |
551 }; | 558 }; |
552 | 559 |
553 | 560 |
554 } // namespace internal | 561 } // namespace internal |
555 } // namespace v8 | 562 } // namespace v8 |
556 | 563 |
557 #endif // V8_MESSAGES_H_ | 564 #endif // V8_MESSAGES_H_ |
OLD | NEW |