| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 unable_to_parse: "Parse error", | 160 unable_to_parse: "Parse error", |
| 161 duplicate_regexp_flag: "Duplicate RegExp flag %0", | 161 duplicate_regexp_flag: "Duplicate RegExp flag %0", |
| 162 invalid_regexp: "Invalid RegExp pattern /%0/", | 162 invalid_regexp: "Invalid RegExp pattern /%0/", |
| 163 illegal_break: "Illegal break statement", | 163 illegal_break: "Illegal break statement", |
| 164 illegal_continue: "Illegal continue statement", | 164 illegal_continue: "Illegal continue statement", |
| 165 illegal_return: "Illegal return statement", | 165 illegal_return: "Illegal return statement", |
| 166 error_loading_debugger: "Error loading debugger", | 166 error_loading_debugger: "Error loading debugger", |
| 167 no_input_to_regexp: "No input to %0", | 167 no_input_to_regexp: "No input to %0", |
| 168 result_not_primitive: "Result of %0 must be a primitive, was %1", | 168 result_not_primitive: "Result of %0 must be a primitive, was %1", |
| 169 invalid_json: "String '%0' is not valid JSON", | 169 invalid_json: "String '%0' is not valid JSON", |
| 170 circular_structure: "Converting circular structure to JSON" | 170 circular_structure: "Converting circular structure to JSON", |
| 171 object_keys_non_object: "Object.keys called on non-object" |
| 171 }; | 172 }; |
| 172 } | 173 } |
| 173 var format = kMessages[message.type]; | 174 var format = kMessages[message.type]; |
| 174 if (!format) return "<unknown message " + message.type + ">"; | 175 if (!format) return "<unknown message " + message.type + ">"; |
| 175 return FormatString(format, message.args); | 176 return FormatString(format, message.args); |
| 176 } | 177 } |
| 177 | 178 |
| 178 | 179 |
| 179 function GetLineNumber(message) { | 180 function GetLineNumber(message) { |
| 180 if (message.startPos == -1) return -1; | 181 if (message.startPos == -1) return -1; |
| (...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 886 return this.name + ": " + FormatMessage({ type: type, args: this.arguments }
); | 887 return this.name + ": " + FormatMessage({ type: type, args: this.arguments }
); |
| 887 } | 888 } |
| 888 var message = this.message; | 889 var message = this.message; |
| 889 return this.name + (message ? (": " + message) : ""); | 890 return this.name + (message ? (": " + message) : ""); |
| 890 }, DONT_ENUM); | 891 }, DONT_ENUM); |
| 891 | 892 |
| 892 | 893 |
| 893 // Boilerplate for exceptions for stack overflows. Used from | 894 // Boilerplate for exceptions for stack overflows. Used from |
| 894 // Top::StackOverflow(). | 895 // Top::StackOverflow(). |
| 895 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); | 896 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); |
| OLD | NEW |