| 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 invalid_regexp: "Invalid RegExp pattern /%0/", | 185 invalid_regexp: "Invalid RegExp pattern /%0/", |
| 186 illegal_break: "Illegal break statement", | 186 illegal_break: "Illegal break statement", |
| 187 illegal_continue: "Illegal continue statement", | 187 illegal_continue: "Illegal continue statement", |
| 188 illegal_return: "Illegal return statement", | 188 illegal_return: "Illegal return statement", |
| 189 error_loading_debugger: "Error loading debugger", | 189 error_loading_debugger: "Error loading debugger", |
| 190 no_input_to_regexp: "No input to %0", | 190 no_input_to_regexp: "No input to %0", |
| 191 result_not_primitive: "Result of %0 must be a primitive, was %1", | 191 result_not_primitive: "Result of %0 must be a primitive, was %1", |
| 192 invalid_json: "String '%0' is not valid JSON", | 192 invalid_json: "String '%0' is not valid JSON", |
| 193 circular_structure: "Converting circular structure to JSON", | 193 circular_structure: "Converting circular structure to JSON", |
| 194 obj_ctor_property_non_object: "Object.%0 called on non-object", | 194 obj_ctor_property_non_object: "Object.%0 called on non-object", |
| 195 array_indexof_not_defined: "Array.getIndexOf: Argument undefined" | 195 array_indexof_not_defined: "Array.getIndexOf: Argument undefined", |
| 196 illegal_access: "illegal access" |
| 196 }; | 197 }; |
| 197 } | 198 } |
| 198 var format = kMessages[message.type]; | 199 var format = kMessages[message.type]; |
| 199 if (!format) return "<unknown message " + message.type + ">"; | 200 if (!format) return "<unknown message " + message.type + ">"; |
| 200 return FormatString(format, message.args); | 201 return FormatString(format, message.args); |
| 201 } | 202 } |
| 202 | 203 |
| 203 | 204 |
| 204 function GetLineNumber(message) { | 205 function GetLineNumber(message) { |
| 205 if (message.startPos == -1) return -1; | 206 if (message.startPos == -1) return -1; |
| (...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 940 return this.name + ": " + FormatMessage({ type: type, args: this.arguments }
); | 941 return this.name + ": " + FormatMessage({ type: type, args: this.arguments }
); |
| 941 } | 942 } |
| 942 var message = this.message; | 943 var message = this.message; |
| 943 return this.name + (message ? (": " + message) : ""); | 944 return this.name + (message ? (": " + message) : ""); |
| 944 }, DONT_ENUM); | 945 }, DONT_ENUM); |
| 945 | 946 |
| 946 | 947 |
| 947 // Boilerplate for exceptions for stack overflows. Used from | 948 // Boilerplate for exceptions for stack overflows. Used from |
| 948 // Top::StackOverflow(). | 949 // Top::StackOverflow(). |
| 949 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); | 950 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); |
| OLD | NEW |