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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 duplicate_regexp_flag: "Duplicate RegExp flag %0", | 171 duplicate_regexp_flag: "Duplicate RegExp flag %0", |
172 invalid_regexp: "Invalid RegExp pattern /%0/", | 172 invalid_regexp: "Invalid RegExp pattern /%0/", |
173 illegal_break: "Illegal break statement", | 173 illegal_break: "Illegal break statement", |
174 illegal_continue: "Illegal continue statement", | 174 illegal_continue: "Illegal continue statement", |
175 illegal_return: "Illegal return statement", | 175 illegal_return: "Illegal return statement", |
176 error_loading_debugger: "Error loading debugger", | 176 error_loading_debugger: "Error loading debugger", |
177 no_input_to_regexp: "No input to %0", | 177 no_input_to_regexp: "No input to %0", |
178 result_not_primitive: "Result of %0 must be a primitive, was %1", | 178 result_not_primitive: "Result of %0 must be a primitive, was %1", |
179 invalid_json: "String '%0' is not valid JSON", | 179 invalid_json: "String '%0' is not valid JSON", |
180 circular_structure: "Converting circular structure to JSON", | 180 circular_structure: "Converting circular structure to JSON", |
181 object_keys_non_object: "Object.keys called on non-object" | 181 object_keys_non_object: "Object.keys called on non-object", |
| 182 object_get_prototype_non_object: "Object.getPrototypeOf called on non-obje
ct" |
182 }; | 183 }; |
183 } | 184 } |
184 var format = kMessages[message.type]; | 185 var format = kMessages[message.type]; |
185 if (!format) return "<unknown message " + message.type + ">"; | 186 if (!format) return "<unknown message " + message.type + ">"; |
186 return FormatString(format, message.args); | 187 return FormatString(format, message.args); |
187 } | 188 } |
188 | 189 |
189 | 190 |
190 function GetLineNumber(message) { | 191 function GetLineNumber(message) { |
191 if (message.startPos == -1) return -1; | 192 if (message.startPos == -1) return -1; |
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
926 return this.name + ": " + FormatMessage({ type: type, args: this.arguments }
); | 927 return this.name + ": " + FormatMessage({ type: type, args: this.arguments }
); |
927 } | 928 } |
928 var message = this.message; | 929 var message = this.message; |
929 return this.name + (message ? (": " + message) : ""); | 930 return this.name + (message ? (": " + message) : ""); |
930 }, DONT_ENUM); | 931 }, DONT_ENUM); |
931 | 932 |
932 | 933 |
933 // Boilerplate for exceptions for stack overflows. Used from | 934 // Boilerplate for exceptions for stack overflows. Used from |
934 // Top::StackOverflow(). | 935 // Top::StackOverflow(). |
935 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); | 936 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); |
OLD | NEW |