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

Side by Side Diff: src/messages.js

Issue 1089303003: Migrate error messages, part 3 (runtime.js). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « src/messages.h ('k') | src/runtime.js » ('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 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 constructor_is_generator: ["Class constructor may not be a generator"], 9 constructor_is_generator: ["Class constructor may not be a generator"],
10 constructor_is_accessor: ["Class constructor may not be an accessor"], 10 constructor_is_accessor: ["Class constructor may not be an accessor"],
(...skipping 15 matching lines...) Expand all
26 regexp_flags: ["Cannot supply flags when constructing one Reg Exp from another"], 26 regexp_flags: ["Cannot supply flags when constructing one Reg Exp from another"],
27 multiple_defaults_in_switch: ["More than one default clause in switch statem ent"], 27 multiple_defaults_in_switch: ["More than one default clause in switch statem ent"],
28 newline_after_throw: ["Illegal newline after throw"], 28 newline_after_throw: ["Illegal newline after throw"],
29 label_redeclaration: ["Label '", "%0", "' has already been declared" ], 29 label_redeclaration: ["Label '", "%0", "' has already been declared" ],
30 var_redeclaration: ["Identifier '", "%0", "' has already been decl ared"], 30 var_redeclaration: ["Identifier '", "%0", "' has already been decl ared"],
31 duplicate_template_property: ["Object template has duplicate property '", "% 0", "'"], 31 duplicate_template_property: ["Object template has duplicate property '", "% 0", "'"],
32 no_catch_or_finally: ["Missing catch or finally after try"], 32 no_catch_or_finally: ["Missing catch or finally after try"],
33 unknown_label: ["Undefined label '", "%0", "'"], 33 unknown_label: ["Undefined label '", "%0", "'"],
34 uncaught_exception: ["Uncaught ", "%0"], 34 uncaught_exception: ["Uncaught ", "%0"],
35 undefined_method: ["Object ", "%1", " has no method '", "%0", "'" ], 35 undefined_method: ["Object ", "%1", " has no method '", "%0", "'" ],
36 cannot_convert_to_primitive: ["Cannot convert object to primitive value"],
37 not_constructor: ["%0", " is not a constructor"],
38 not_defined: ["%0", " is not defined"], 36 not_defined: ["%0", " is not defined"],
39 non_method: ["'super' is referenced from non-method"], 37 non_method: ["'super' is referenced from non-method"],
40 unsupported_super: ["Unsupported reference to 'super'"], 38 unsupported_super: ["Unsupported reference to 'super'"],
41 non_object_property_load: ["Cannot read property '", "%0", "' of ", "%1"] , 39 non_object_property_load: ["Cannot read property '", "%0", "' of ", "%1"] ,
42 non_object_property_store: ["Cannot set property '", "%0", "' of ", "%1"], 40 non_object_property_store: ["Cannot set property '", "%0", "' of ", "%1"],
43 illegal_invocation: ["Illegal invocation"], 41 illegal_invocation: ["Illegal invocation"],
44 no_setter_in_callback: ["Cannot set property ", "%0", " of ", "%1", " which has only a getter"], 42 no_setter_in_callback: ["Cannot set property ", "%0", " of ", "%1", " which has only a getter"],
45 apply_non_function: ["Function.prototype.apply was called on ", "%0 ", ", which is a ", "%1", " and not a function"],
46 apply_wrong_args: ["Function.prototype.apply: Arguments list has wrong type"],
47 reflect_apply_wrong_args: ["Reflect.apply: Arguments list has wrong type" ],
48 reflect_construct_wrong_args: ["Reflect.construct: Arguments list has wrong t ype"],
49 flags_getter_non_object: ["RegExp.prototype.flags getter called on non-o bject ", "%0"], 43 flags_getter_non_object: ["RegExp.prototype.flags getter called on non-o bject ", "%0"],
50 invalid_in_operator_use: ["Cannot use 'in' operator to search for '", "% 0", "' in ", "%1"],
51 instanceof_function_expected: ["Expecting a function in instanceof check, but got ", "%0"],
52 instanceof_nonobject_proto: ["Function has non-object prototype '", "%0", " ' in instanceof check"],
53 undefined_or_null_to_object: ["Cannot convert undefined or null to object"],
54 reduce_no_initial: ["Reduce of empty array with no initial value"] , 44 reduce_no_initial: ["Reduce of empty array with no initial value"] ,
55 getter_must_be_callable: ["Getter must be a function: ", "%0"], 45 getter_must_be_callable: ["Getter must be a function: ", "%0"],
56 setter_must_be_callable: ["Setter must be a function: ", "%0"], 46 setter_must_be_callable: ["Setter must be a function: ", "%0"],
57 value_and_accessor: ["Invalid property. A property cannot both hav e accessors and be writable or have a value, ", "%0"], 47 value_and_accessor: ["Invalid property. A property cannot both hav e accessors and be writable or have a value, ", "%0"],
58 proto_object_or_null: ["Object prototype may only be an Object or nul l: ", "%0"], 48 proto_object_or_null: ["Object prototype may only be an Object or nul l: ", "%0"],
59 property_desc_object: ["Property description must be an object: ", "% 0"], 49 property_desc_object: ["Property description must be an object: ", "% 0"],
60 redefine_disallowed: ["Cannot redefine property: ", "%0"], 50 redefine_disallowed: ["Cannot redefine property: ", "%0"],
61 define_disallowed: ["Cannot define property:", "%0", ", object is not extensible."], 51 define_disallowed: ["Cannot define property:", "%0", ", object is not extensible."],
62 non_extensible_proto: ["%0", " is not extensible"], 52 non_extensible_proto: ["%0", " is not extensible"],
63 handler_non_object: ["Proxy.", "%0", " called with non-object as ha ndler"], 53 handler_non_object: ["Proxy.", "%0", " called with non-object as ha ndler"],
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 invalid_typed_array_alignment: ["%0", " of ", "%1", " should be a multiple of ", "%2"], 96 invalid_typed_array_alignment: ["%0", " of ", "%1", " should be a multiple of ", "%2"],
107 typed_array_set_source_too_large: 97 typed_array_set_source_too_large:
108 ["Source is too large"], 98 ["Source is too large"],
109 typed_array_set_negative_offset: 99 typed_array_set_negative_offset:
110 ["Start offset is negative"], 100 ["Start offset is negative"],
111 invalid_data_view_offset: ["Start offset is outside the bounds of the buf fer"], 101 invalid_data_view_offset: ["Start offset is outside the bounds of the buf fer"],
112 invalid_data_view_length: ["Invalid data view length"], 102 invalid_data_view_length: ["Invalid data view length"],
113 invalid_data_view_accessor_offset: 103 invalid_data_view_accessor_offset:
114 ["Offset is outside the bounds of the DataView" ], 104 ["Offset is outside the bounds of the DataView" ],
115 105
116 stack_overflow: ["Maximum call stack size exceeded"],
117 invalid_time_value: ["Invalid time value"], 106 invalid_time_value: ["Invalid time value"],
118 invalid_count_value: ["Invalid count value"], 107 invalid_count_value: ["Invalid count value"],
119 invalid_code_point: ["Invalid code point ", "%0"], 108 invalid_code_point: ["Invalid code point ", "%0"],
120 // ReferenceError 109 // ReferenceError
121 invalid_lhs_in_assignment: ["Invalid left-hand side in assignment"], 110 invalid_lhs_in_assignment: ["Invalid left-hand side in assignment"],
122 invalid_lhs_in_for: ["Invalid left-hand side in for-loop"], 111 invalid_lhs_in_for: ["Invalid left-hand side in for-loop"],
123 invalid_lhs_in_postfix_op: ["Invalid left-hand side expression in postfix operation"], 112 invalid_lhs_in_postfix_op: ["Invalid left-hand side expression in postfix operation"],
124 invalid_lhs_in_prefix_op: ["Invalid left-hand side expression in prefix o peration"], 113 invalid_lhs_in_prefix_op: ["Invalid left-hand side expression in prefix o peration"],
125 // SyntaxError 114 // SyntaxError
126 paren_in_arg_string: ["Function arg string contains parenthesis"], 115 paren_in_arg_string: ["Function arg string contains parenthesis"],
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 strong_super_call_missing: ["In strong mode, invoking the super constructo r in a subclass is required"], 161 strong_super_call_missing: ["In strong mode, invoking the super constructo r in a subclass is required"],
173 strong_super_call_duplicate: ["In strong mode, invoking the super constructo r multiple times is deprecated"], 162 strong_super_call_duplicate: ["In strong mode, invoking the super constructo r multiple times is deprecated"],
174 strong_super_call_nested: ["In strong mode, invoking the super constructo r nested inside another statement or expression is deprecated"], 163 strong_super_call_nested: ["In strong mode, invoking the super constructo r nested inside another statement or expression is deprecated"],
175 strong_constructor_return_value: ["In strong mode, returning a value from a co nstructor is deprecated"], 164 strong_constructor_return_value: ["In strong mode, returning a value from a co nstructor is deprecated"],
176 strong_constructor_return_misplaced: ["In strong mode, returning from a constr uctor before its super constructor invocation is deprecated"], 165 strong_constructor_return_misplaced: ["In strong mode, returning from a constr uctor before its super constructor invocation is deprecated"],
177 sloppy_lexical: ["Block-scoped declarations (let, const, functi on, class) not yet supported outside strict mode"], 166 sloppy_lexical: ["Block-scoped declarations (let, const, functi on, class) not yet supported outside strict mode"],
178 malformed_arrow_function_parameter_list: ["Malformed arrow function parameter list"], 167 malformed_arrow_function_parameter_list: ["Malformed arrow function parameter list"],
179 cant_prevent_ext_external_array_elements: ["Cannot prevent extension of an obj ect with external array elements"], 168 cant_prevent_ext_external_array_elements: ["Cannot prevent extension of an obj ect with external array elements"],
180 redef_external_array_element: ["Cannot redefine a property of an object with external array elements"], 169 redef_external_array_element: ["Cannot redefine a property of an object with external array elements"],
181 const_assign: ["Assignment to constant variable."], 170 const_assign: ["Assignment to constant variable."],
182 symbol_to_string: ["Cannot convert a Symbol value to a string"],
183 symbol_to_primitive: ["Cannot convert a Symbol wrapper object to a p rimitive value"],
184 symbol_to_number: ["Cannot convert a Symbol value to a number"],
185 module_export_undefined: ["Export '", "%0", "' is not defined in module" ], 171 module_export_undefined: ["Export '", "%0", "' is not defined in module" ],
186 duplicate_export: ["Duplicate export of '", "%0", "'"], 172 duplicate_export: ["Duplicate export of '", "%0", "'"],
187 unexpected_super: ["'super' keyword unexpected here"], 173 unexpected_super: ["'super' keyword unexpected here"],
188 extends_value_not_a_function: ["Class extends value ", "%0", " is not a funct ion or null"], 174 extends_value_not_a_function: ["Class extends value ", "%0", " is not a funct ion or null"],
189 prototype_parent_not_an_object: ["Class extends value does not have valid prot otype property ", "%0"], 175 prototype_parent_not_an_object: ["Class extends value does not have valid prot otype property ", "%0"],
190 duplicate_constructor: ["A class may only have one constructor"], 176 duplicate_constructor: ["A class may only have one constructor"],
191 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."], 177 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."],
192 duplicate_proto: ["Duplicate __proto__ fields are not allowed in object literals"], 178 duplicate_proto: ["Duplicate __proto__ fields are not allowed in object literals"],
193 param_after_rest: ["Rest parameter must be last formal parameter" ], 179 param_after_rest: ["Rest parameter must be last formal parameter" ],
194 constructor_noncallable: ["Class constructors cannot be invoked without 'new'"], 180 constructor_noncallable: ["Class constructors cannot be invoked without 'new'"],
(...skipping 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 throw e; 1266 throw e;
1281 } 1267 }
1282 } 1268 }
1283 1269
1284 1270
1285 InstallFunctions($Error.prototype, DONT_ENUM, ['toString', ErrorToString]); 1271 InstallFunctions($Error.prototype, DONT_ENUM, ['toString', ErrorToString]);
1286 1272
1287 // Boilerplate for exceptions for stack overflows. Used from 1273 // Boilerplate for exceptions for stack overflows. Used from
1288 // Isolate::StackOverflow(). 1274 // Isolate::StackOverflow().
1289 function SetUpStackOverflowBoilerplate() { 1275 function SetUpStackOverflowBoilerplate() {
1290 var boilerplate = MakeRangeError('stack_overflow', []); 1276 var boilerplate = MakeRangeError(kStackOverflow);
1291 1277
1292 %DefineAccessorPropertyUnchecked( 1278 %DefineAccessorPropertyUnchecked(
1293 boilerplate, 'stack', StackTraceGetter, StackTraceSetter, DONT_ENUM); 1279 boilerplate, 'stack', StackTraceGetter, StackTraceSetter, DONT_ENUM);
1294 1280
1295 return boilerplate; 1281 return boilerplate;
1296 } 1282 }
1297 1283
1298 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); 1284 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate();
OLDNEW
« no previous file with comments | « src/messages.h ('k') | src/runtime.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698