Chromium Code Reviews| 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 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 575 T(NotIsvar, "builtin %%IS_VAR: not a variable") \ | 575 T(NotIsvar, "builtin %%IS_VAR: not a variable") \ |
| 576 T(ParamAfterRest, "Rest parameter must be last formal parameter") \ | 576 T(ParamAfterRest, "Rest parameter must be last formal parameter") \ |
| 577 T(PushPastSafeLength, \ | 577 T(PushPastSafeLength, \ |
| 578 "Pushing % elements on an array-like of length % " \ | 578 "Pushing % elements on an array-like of length % " \ |
| 579 "is disallowed, as the total surpasses 2**53-1") \ | 579 "is disallowed, as the total surpasses 2**53-1") \ |
| 580 T(ElementAfterRest, "Rest element must be last element in array") \ | 580 T(ElementAfterRest, "Rest element must be last element in array") \ |
| 581 T(BadSetterRestParameter, \ | 581 T(BadSetterRestParameter, \ |
| 582 "Setter function argument must not be a rest parameter") \ | 582 "Setter function argument must not be a rest parameter") \ |
| 583 T(ParamDupe, "Duplicate parameter name not allowed in this context") \ | 583 T(ParamDupe, "Duplicate parameter name not allowed in this context") \ |
| 584 T(ParenthesisInArgString, "Function arg string contains parenthesis") \ | 584 T(ParenthesisInArgString, "Function arg string contains parenthesis") \ |
| 585 T(ExpectedEndOfParameters, "Expected arg string to end here") \ | |
|
Dan Ehrenberg
2016/12/06 00:32:13
Aren't we talking about cases where someone effect
jwolfe
2017/01/13 00:28:47
I split the error into two different messages:
(f
| |
| 585 T(RuntimeWrongNumArgs, "Runtime function given wrong number of arguments") \ | 586 T(RuntimeWrongNumArgs, "Runtime function given wrong number of arguments") \ |
| 586 T(SingleFunctionLiteral, "Single function literal required") \ | 587 T(SingleFunctionLiteral, "Single function literal required") \ |
| 587 T(SloppyFunction, \ | 588 T(SloppyFunction, \ |
| 588 "In non-strict mode code, functions can only be declared at top level, " \ | 589 "In non-strict mode code, functions can only be declared at top level, " \ |
| 589 "inside a block, or as the body of an if statement.") \ | 590 "inside a block, or as the body of an if statement.") \ |
| 590 T(SpeciesNotConstructor, \ | 591 T(SpeciesNotConstructor, \ |
| 591 "object.constructor[Symbol.species] is not a constructor") \ | 592 "object.constructor[Symbol.species] is not a constructor") \ |
| 592 T(StrictDelete, "Delete of an unqualified identifier in strict mode.") \ | 593 T(StrictDelete, "Delete of an unqualified identifier in strict mode.") \ |
| 593 T(StrictEvalArguments, "Unexpected eval or arguments in strict mode") \ | 594 T(StrictEvalArguments, "Unexpected eval or arguments in strict mode") \ |
| 594 T(StrictFunction, \ | 595 T(StrictFunction, \ |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 704 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); | 705 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); |
| 705 static std::unique_ptr<char[]> GetLocalizedMessage(Isolate* isolate, | 706 static std::unique_ptr<char[]> GetLocalizedMessage(Isolate* isolate, |
| 706 Handle<Object> data); | 707 Handle<Object> data); |
| 707 }; | 708 }; |
| 708 | 709 |
| 709 | 710 |
| 710 } // namespace internal | 711 } // namespace internal |
| 711 } // namespace v8 | 712 } // namespace v8 |
| 712 | 713 |
| 713 #endif // V8_MESSAGES_H_ | 714 #endif // V8_MESSAGES_H_ |
| OLD | NEW |