| 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 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 const kMessages = { | 54 const kMessages = { |
| 55 // Error | 55 // Error |
| 56 cyclic_proto: "Cyclic __proto__ value", | 56 cyclic_proto: "Cyclic __proto__ value", |
| 57 // TypeError | 57 // TypeError |
| 58 unexpected_token: "Unexpected token %0", | 58 unexpected_token: "Unexpected token %0", |
| 59 unexpected_token_number: "Unexpected number", | 59 unexpected_token_number: "Unexpected number", |
| 60 unexpected_token_string: "Unexpected string", | 60 unexpected_token_string: "Unexpected string", |
| 61 unexpected_token_identifier: "Unexpected identifier", | 61 unexpected_token_identifier: "Unexpected identifier", |
| 62 unexpected_eos: "Unexpected end of input", | 62 unexpected_eos: "Unexpected end of input", |
| 63 expected_label: "Expected label", | |
| 64 malformed_regexp: "Invalid regular expression: /%0/: %1", | 63 malformed_regexp: "Invalid regular expression: /%0/: %1", |
| 65 unterminated_regexp: "Invalid regular expression: missing /", | 64 unterminated_regexp: "Invalid regular expression: missing /", |
| 66 pcre_error: "PCRE function %0, error code %1", | |
| 67 regexp_flags: "Cannot supply flags when constructing one RegEx
p from another", | 65 regexp_flags: "Cannot supply flags when constructing one RegEx
p from another", |
| 68 invalid_lhs_in_assignment: "Invalid left-hand side in assignment", | 66 invalid_lhs_in_assignment: "Invalid left-hand side in assignment", |
| 69 invalid_lhs_in_for_in: "Invalid left-hand side in for-in", | 67 invalid_lhs_in_for_in: "Invalid left-hand side in for-in", |
| 70 invalid_lhs_in_postfix_op: "Invalid left-hand side expression in postfix op
eration", | 68 invalid_lhs_in_postfix_op: "Invalid left-hand side expression in postfix op
eration", |
| 71 invalid_lhs_in_prefix_op: "Invalid left-hand side expression in prefix ope
ration", | 69 invalid_lhs_in_prefix_op: "Invalid left-hand side expression in prefix ope
ration", |
| 72 multiple_defaults_in_switch: "More than one default clause in switch statemen
t", | 70 multiple_defaults_in_switch: "More than one default clause in switch statemen
t", |
| 73 newline_after_throw: "Illegal newline after throw", | 71 newline_after_throw: "Illegal newline after throw", |
| 74 redeclaration: "%0 '%1' has already been declared", | 72 redeclaration: "%0 '%1' has already been declared", |
| 75 no_catch_or_finally: "Missing catch or finally after try", | 73 no_catch_or_finally: "Missing catch or finally after try", |
| 76 unknown_label: "Undefined label '%0'", | 74 unknown_label: "Undefined label '%0'", |
| 77 invalid_break: "Invalid break statement", | |
| 78 invalid_continue: "Invalid continue statement", | |
| 79 uncaught_exception: "Uncaught %0", | 75 uncaught_exception: "Uncaught %0", |
| 80 stack_trace: "Stack Trace:\n%0", | 76 stack_trace: "Stack Trace:\n%0", |
| 81 called_non_callable: "%0 is not a function", | 77 called_non_callable: "%0 is not a function", |
| 82 undefined_method: "Object %1 has no method '%0'", | 78 undefined_method: "Object %1 has no method '%0'", |
| 83 property_not_function: "Property '%0' of object %1 is not a function", | 79 property_not_function: "Property '%0' of object %1 is not a function", |
| 84 null_or_undefined: "Cannot access property of null or undefined", | |
| 85 cannot_convert_to_primitive: "Cannot convert object to primitive value", | 80 cannot_convert_to_primitive: "Cannot convert object to primitive value", |
| 86 not_constructor: "%0 is not a constructor", | 81 not_constructor: "%0 is not a constructor", |
| 87 not_defined: "%0 is not defined", | 82 not_defined: "%0 is not defined", |
| 88 non_object_property_load: "Cannot read property '%0' of %1", | 83 non_object_property_load: "Cannot read property '%0' of %1", |
| 89 non_object_property_store: "Cannot set property '%0' of %1", | 84 non_object_property_store: "Cannot set property '%0' of %1", |
| 90 non_object_property_call: "Cannot call method '%0' of %1", | 85 non_object_property_call: "Cannot call method '%0' of %1", |
| 91 illegal_eval: "Unsupported indirect eval() call", | |
| 92 with_expression: "%0 has no properties", | 86 with_expression: "%0 has no properties", |
| 93 illegal_invocation: "Illegal invocation", | 87 illegal_invocation: "Illegal invocation", |
| 94 no_setter_in_callback: "Cannot set property %0 of %1 which has only a g
etter", | 88 no_setter_in_callback: "Cannot set property %0 of %1 which has only a g
etter", |
| 95 apply_non_function: "Function.prototype.apply was called on %0, whic
h is a %1 and not a function", | 89 apply_non_function: "Function.prototype.apply was called on %0, whic
h is a %1 and not a function", |
| 96 apply_wrong_args: "Function.prototype.apply: Arguments list has wr
ong type", | 90 apply_wrong_args: "Function.prototype.apply: Arguments list has wr
ong type", |
| 97 invalid_in_operator_use: "Cannot use 'in' operator to search for '%0' in
%1", | 91 invalid_in_operator_use: "Cannot use 'in' operator to search for '%0' in
%1", |
| 98 instanceof_function_expected: "Expecting a function in instanceof check, but g
ot %0", | 92 instanceof_function_expected: "Expecting a function in instanceof check, but g
ot %0", |
| 99 instanceof_nonobject_proto: "Function has non-object prototype '%0' in insta
nceof check", | 93 instanceof_nonobject_proto: "Function has non-object prototype '%0' in insta
nceof check", |
| 100 null_to_object: "Cannot convert null to object", | 94 null_to_object: "Cannot convert null to object", |
| 101 reduce_no_initial: "Reduce of empty array with no initial value", | 95 reduce_no_initial: "Reduce of empty array with no initial value", |
| 102 // RangeError | 96 // RangeError |
| 103 invalid_array_length: "Invalid array length", | 97 invalid_array_length: "Invalid array length", |
| 104 invalid_array_apply_length: "Function.prototype.apply supports only up to 10
24 arguments", | |
| 105 stack_overflow: "Maximum call stack size exceeded", | 98 stack_overflow: "Maximum call stack size exceeded", |
| 106 apply_overflow: "Function.prototype.apply cannot support %0 argu
ments", | 99 apply_overflow: "Function.prototype.apply cannot support %0 argu
ments", |
| 107 // SyntaxError | 100 // SyntaxError |
| 108 unable_to_parse: "Parse error", | 101 unable_to_parse: "Parse error", |
| 109 duplicate_regexp_flag: "Duplicate RegExp flag %0", | 102 duplicate_regexp_flag: "Duplicate RegExp flag %0", |
| 110 unrecognized_regexp_flag: "Unrecognized RegExp flag %0", | |
| 111 invalid_regexp: "Invalid RegExp pattern /%0/", | 103 invalid_regexp: "Invalid RegExp pattern /%0/", |
| 112 illegal_break: "Illegal break statement", | 104 illegal_break: "Illegal break statement", |
| 113 illegal_continue: "Illegal continue statement", | 105 illegal_continue: "Illegal continue statement", |
| 114 illegal_return: "Illegal return statement", | 106 illegal_return: "Illegal return statement", |
| 115 error_loading_debugger: "Error loading debugger %0", | 107 error_loading_debugger: "Error loading debugger %0", |
| 116 no_input_to_regexp: "No input to %0", | 108 no_input_to_regexp: "No input to %0", |
| 117 result_not_primitive: "Result of %0 must be a primitive, was %1", | 109 result_not_primitive: "Result of %0 must be a primitive, was %1", |
| 118 invalid_json: "String '%0' is not valid JSON", | 110 invalid_json: "String '%0' is not valid JSON", |
| 119 circular_structure: "Converting circular structure to JSON" | 111 circular_structure: "Converting circular structure to JSON" |
| 120 }; | 112 }; |
| (...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 876 return this.name + ": " + FormatMessage({ type: type, args: this.arguments }
); | 868 return this.name + ": " + FormatMessage({ type: type, args: this.arguments }
); |
| 877 } | 869 } |
| 878 var message = this.message; | 870 var message = this.message; |
| 879 return this.name + (message ? (": " + message) : ""); | 871 return this.name + (message ? (": " + message) : ""); |
| 880 }, DONT_ENUM); | 872 }, DONT_ENUM); |
| 881 | 873 |
| 882 | 874 |
| 883 // Boilerplate for exceptions for stack overflows. Used from | 875 // Boilerplate for exceptions for stack overflows. Used from |
| 884 // Top::StackOverflow(). | 876 // Top::StackOverflow(). |
| 885 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); | 877 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); |
| OLD | NEW |