OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 // ------------------------------------------------------------------- | 5 // ------------------------------------------------------------------- |
6 | 6 |
7 var kMessages = { | 7 var kMessages = { |
8 // Error | 8 // Error |
9 cyclic_proto: ["Cyclic __proto__ value"], | 9 cyclic_proto: ["Cyclic __proto__ value"], |
10 code_gen_from_strings: ["%0"], | 10 code_gen_from_strings: ["%0"], |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
169 malformed_arrow_function_parameter_list: ["Malformed arrow function parameter list"], | 169 malformed_arrow_function_parameter_list: ["Malformed arrow function parameter list"], |
170 generator_poison_pill: ["'caller' and 'arguments' properties may not b e accessed on generator functions."], | 170 generator_poison_pill: ["'caller' and 'arguments' properties may not b e accessed on generator functions."], |
171 cant_prevent_ext_external_array_elements: ["Cannot prevent extension of an obj ect with external array elements"], | 171 cant_prevent_ext_external_array_elements: ["Cannot prevent extension of an obj ect with external array elements"], |
172 redef_external_array_element: ["Cannot redefine a property of an object with external array elements"], | 172 redef_external_array_element: ["Cannot redefine a property of an object with external array elements"], |
173 harmony_const_assign: ["Assignment to constant variable."], | 173 harmony_const_assign: ["Assignment to constant variable."], |
174 symbol_to_string: ["Cannot convert a Symbol value to a string"], | 174 symbol_to_string: ["Cannot convert a Symbol value to a string"], |
175 symbol_to_primitive: ["Cannot convert a Symbol wrapper object to a p rimitive value"], | 175 symbol_to_primitive: ["Cannot convert a Symbol wrapper object to a p rimitive value"], |
176 symbol_to_number: ["Cannot convert a Symbol value to a number"], | 176 symbol_to_number: ["Cannot convert a Symbol value to a number"], |
177 invalid_module_path: ["Module does not export '", "%0", "', or expor t is not itself a module"], | 177 invalid_module_path: ["Module does not export '", "%0", "', or expor t is not itself a module"], |
178 module_export_undefined: ["Export '", "%0", "' is not defined in module" ], | 178 module_export_undefined: ["Export '", "%0", "' is not defined in module" ], |
179 duplicate_export: ["Cannot export '", "%0", "' more than once"], | |
arv (Not doing code reviews)
2015/02/19 15:05:44
I think the error message should contain "duplicat
rossberg
2015/02/19 15:18:13
+1
adamk
2015/02/19 19:10:09
Done.
| |
179 unexpected_super: ["'super' keyword unexpected here"], | 180 unexpected_super: ["'super' keyword unexpected here"], |
180 extends_value_not_a_function: ["Class extends value ", "%0", " is not a funct ion or null"], | 181 extends_value_not_a_function: ["Class extends value ", "%0", " is not a funct ion or null"], |
181 prototype_parent_not_an_object: ["Class extends value does not have valid prot otype property ", "%0"], | 182 prototype_parent_not_an_object: ["Class extends value does not have valid prot otype property ", "%0"], |
182 duplicate_constructor: ["A class may only have one constructor"], | 183 duplicate_constructor: ["A class may only have one constructor"], |
183 super_constructor_call: ["A 'super' constructor call may only appear as the first statement of a function, and its arguments may not access 'this'. Oth er forms are not yet supported."], | 184 super_constructor_call: ["A 'super' constructor call may only appear as the first statement of a function, and its arguments may not access 'this'. Oth er forms are not yet supported."], |
184 duplicate_proto: ["Duplicate __proto__ fields are not allowed in object literals"], | 185 duplicate_proto: ["Duplicate __proto__ fields are not allowed in object literals"], |
185 param_after_rest: ["Rest parameter must be last formal parameter" ], | 186 param_after_rest: ["Rest parameter must be last formal parameter" ], |
186 constructor_noncallable: ["Class constructors cannot be invoked without 'new'"] | 187 constructor_noncallable: ["Class constructors cannot be invoked without 'new'"] |
187 }; | 188 }; |
188 | 189 |
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1317 function SetUpStackOverflowBoilerplate() { | 1318 function SetUpStackOverflowBoilerplate() { |
1318 var boilerplate = MakeRangeError('stack_overflow', []); | 1319 var boilerplate = MakeRangeError('stack_overflow', []); |
1319 | 1320 |
1320 %DefineAccessorPropertyUnchecked( | 1321 %DefineAccessorPropertyUnchecked( |
1321 boilerplate, 'stack', StackTraceGetter, StackTraceSetter, DONT_ENUM); | 1322 boilerplate, 'stack', StackTraceGetter, StackTraceSetter, DONT_ENUM); |
1322 | 1323 |
1323 return boilerplate; | 1324 return boilerplate; |
1324 } | 1325 } |
1325 | 1326 |
1326 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); | 1327 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); |
OLD | NEW |