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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 illegal_continue: "Illegal continue statement", | 189 illegal_continue: "Illegal continue statement", |
190 illegal_return: "Illegal return statement", | 190 illegal_return: "Illegal return statement", |
191 error_loading_debugger: "Error loading debugger", | 191 error_loading_debugger: "Error loading debugger", |
192 no_input_to_regexp: "No input to %0", | 192 no_input_to_regexp: "No input to %0", |
193 invalid_json: "String '%0' is not valid JSON", | 193 invalid_json: "String '%0' is not valid JSON", |
194 circular_structure: "Converting circular structure to JSON", | 194 circular_structure: "Converting circular structure to JSON", |
195 obj_ctor_property_non_object: "Object.%0 called on non-object", | 195 obj_ctor_property_non_object: "Object.%0 called on non-object", |
196 array_indexof_not_defined: "Array.getIndexOf: Argument undefined", | 196 array_indexof_not_defined: "Array.getIndexOf: Argument undefined", |
197 object_not_extensible: "Can't add property %0, object is not extens
ible", | 197 object_not_extensible: "Can't add property %0, object is not extens
ible", |
198 illegal_access: "Illegal access", | 198 illegal_access: "Illegal access", |
199 invalid_preparser_data: "Invalid preparser data for function %0" | 199 invalid_preparser_data: "Invalid preparser data for function %0", |
| 200 strict_mode_with: "Strict mode code may not include a with sta
tement", |
| 201 strict_catch_variable: "Catch variable may not be eval or arguments
in strict mode", |
| 202 strict_param_name: "Parameter name eval or arguments is not all
owed in strict mode", |
| 203 strict_param_dupe: "Strict mode function may not have duplicate
parameter names", |
| 204 strict_var_name: "Variable name may not be eval or arguments
in strict mode", |
| 205 strict_function_name: "Function name may not be eval or arguments
in strict mode", |
200 }; | 206 }; |
201 } | 207 } |
202 var format = kMessages[message.type]; | 208 var format = kMessages[message.type]; |
203 if (!format) return "<unknown message " + message.type + ">"; | 209 if (!format) return "<unknown message " + message.type + ">"; |
204 return FormatString(format, message.args); | 210 return FormatString(format, message.args); |
205 } | 211 } |
206 | 212 |
207 | 213 |
208 function GetLineNumber(message) { | 214 function GetLineNumber(message) { |
209 if (message.startPos == -1) return kNoLineNumberInfo; | 215 if (message.startPos == -1) return kNoLineNumberInfo; |
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
993 return this.name + ": " + FormatMessage({ type: type, args: this.arguments }
); | 999 return this.name + ": " + FormatMessage({ type: type, args: this.arguments }
); |
994 } | 1000 } |
995 var message = this.message; | 1001 var message = this.message; |
996 return this.name + (message ? (": " + message) : ""); | 1002 return this.name + (message ? (": " + message) : ""); |
997 }, DONT_ENUM); | 1003 }, DONT_ENUM); |
998 | 1004 |
999 | 1005 |
1000 // Boilerplate for exceptions for stack overflows. Used from | 1006 // Boilerplate for exceptions for stack overflows. Used from |
1001 // Top::StackOverflow(). | 1007 // Top::StackOverflow(). |
1002 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); | 1008 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); |
OLD | NEW |