| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import 'dart:_internal' as internal; | 5 import 'dart:_internal' as internal; |
| 6 import 'dart:convert' show JSON; | 6 import 'dart:convert' show JSON; |
| 7 | 7 |
| 8 patch class Error { | 8 patch class Error { |
| 9 /* patch */ static String _objectToString(Object object) { | 9 /* patch */ static String _objectToString(Object object) { |
| 10 return Object._toString(object); | 10 return Object._toString(object); |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 namedArguments[new Symbol(argumentNames[i])] = arg_value; | 174 namedArguments[new Symbol(argumentNames[i])] = arg_value; |
| 175 } | 175 } |
| 176 throw new NoSuchMethodError._withType(receiver, | 176 throw new NoSuchMethodError._withType(receiver, |
| 177 new Symbol(memberName), | 177 new Symbol(memberName), |
| 178 invocation_type, | 178 invocation_type, |
| 179 positionalArguments, | 179 positionalArguments, |
| 180 namedArguments, | 180 namedArguments, |
| 181 existingArgumentNames); | 181 existingArgumentNames); |
| 182 } | 182 } |
| 183 | 183 |
| 184 // Calls _throwNew if 'prefix' not loaded. |
| 185 static void _throwNewIfNotLoaded(_LibraryPrefix prefix, |
| 186 Object receiver, |
| 187 String memberName, |
| 188 int invocation_type, |
| 189 List arguments, |
| 190 List argumentNames, |
| 191 List existingArgumentNames) { |
| 192 if (!prefix.is_loaded()) { |
| 193 _throwNew(receiver, memberName, invocation_type, arguments, |
| 194 argumentNames, existingArgumentNames); |
| 195 } |
| 196 } |
| 197 |
| 184 // Remember the type from the invocation mirror or static compilation | 198 // Remember the type from the invocation mirror or static compilation |
| 185 // analysis when thrown directly with _throwNew. A negative value means | 199 // analysis when thrown directly with _throwNew. A negative value means |
| 186 // that no information is available. | 200 // that no information is available. |
| 187 final int _invocation_type; | 201 final int _invocation_type; |
| 188 | 202 |
| 189 NoSuchMethodError(Object this._receiver, | 203 NoSuchMethodError(Object this._receiver, |
| 190 Symbol this._memberName, | 204 Symbol this._memberName, |
| 191 List this._arguments, | 205 List this._arguments, |
| 192 Map<Symbol, dynamic> this._namedArguments, | 206 Map<Symbol, dynamic> this._namedArguments, |
| 193 [List existingArgumentNames = null]) | 207 [List existingArgumentNames = null]) |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 String toString() => "Javascript Integer Overflow: $_value"; | 359 String toString() => "Javascript Integer Overflow: $_value"; |
| 346 } | 360 } |
| 347 | 361 |
| 348 class _JavascriptCompatibilityError extends Error { | 362 class _JavascriptCompatibilityError extends Error { |
| 349 final String _msg; | 363 final String _msg; |
| 350 | 364 |
| 351 _JavascriptCompatibilityError(this._msg); | 365 _JavascriptCompatibilityError(this._msg); |
| 352 String toString() => "Javascript Compatibility Error: $_msg"; | 366 String toString() => "Javascript Compatibility Error: $_msg"; |
| 353 } | 367 } |
| 354 | 368 |
| OLD | NEW |