| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 invalid_regexp: "Invalid RegExp pattern /%0/", | 175 invalid_regexp: "Invalid RegExp pattern /%0/", |
| 176 illegal_break: "Illegal break statement", | 176 illegal_break: "Illegal break statement", |
| 177 illegal_continue: "Illegal continue statement", | 177 illegal_continue: "Illegal continue statement", |
| 178 illegal_return: "Illegal return statement", | 178 illegal_return: "Illegal return statement", |
| 179 error_loading_debugger: "Error loading debugger", | 179 error_loading_debugger: "Error loading debugger", |
| 180 no_input_to_regexp: "No input to %0", | 180 no_input_to_regexp: "No input to %0", |
| 181 result_not_primitive: "Result of %0 must be a primitive, was %1", | 181 result_not_primitive: "Result of %0 must be a primitive, was %1", |
| 182 invalid_json: "String '%0' is not valid JSON", | 182 invalid_json: "String '%0' is not valid JSON", |
| 183 circular_structure: "Converting circular structure to JSON", | 183 circular_structure: "Converting circular structure to JSON", |
| 184 obj_ctor_property_non_object: "Object.%0 called on non-object", | 184 obj_ctor_property_non_object: "Object.%0 called on non-object", |
| 185 array_indexof_not_defined: "Array.getIndexOf: Argument undefined" | 185 array_indexof_not_defined: "Array.getIndexOf: Argument undefined", |
| 186 illegal_access: "illegal access" |
| 186 }; | 187 }; |
| 187 } | 188 } |
| 188 var format = kMessages[message.type]; | 189 var format = kMessages[message.type]; |
| 189 if (!format) return "<unknown message " + message.type + ">"; | 190 if (!format) return "<unknown message " + message.type + ">"; |
| 190 return FormatString(format, message.args); | 191 return FormatString(format, message.args); |
| 191 } | 192 } |
| 192 | 193 |
| 193 | 194 |
| 194 function GetLineNumber(message) { | 195 function GetLineNumber(message) { |
| 195 if (message.startPos == -1) return -1; | 196 if (message.startPos == -1) return -1; |
| (...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 930 return this.name + ": " + FormatMessage({ type: type, args: this.arguments }
); | 931 return this.name + ": " + FormatMessage({ type: type, args: this.arguments }
); |
| 931 } | 932 } |
| 932 var message = this.message; | 933 var message = this.message; |
| 933 return this.name + (message ? (": " + message) : ""); | 934 return this.name + (message ? (": " + message) : ""); |
| 934 }, DONT_ENUM); | 935 }, DONT_ENUM); |
| 935 | 936 |
| 936 | 937 |
| 937 // Boilerplate for exceptions for stack overflows. Used from | 938 // Boilerplate for exceptions for stack overflows. Used from |
| 938 // Top::StackOverflow(). | 939 // Top::StackOverflow(). |
| 939 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); | 940 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); |
| OLD | NEW |