| 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 patch class Error { | 5 patch class Error { |
| 6 /* patch */ static String _objectToString(Object object) { | 6 /* patch */ static String _objectToString(Object object) { |
| 7 return Object._toString(object); | 7 return Object._toString(object); |
| 8 } | 8 } |
| 9 } | |
| 10 | 9 |
| 11 patch class StackTraceOnThrow { | |
| 12 // TODO(11680): implement stackTrace on Error. | 10 // TODO(11680): implement stackTrace on Error. |
| 13 /* patch */ StackTrace get stackTrace => null; | 11 /* patch */ StackTrace get stackTrace => null; |
| 14 } | 12 } |
| 15 | 13 |
| 16 patch class NoSuchMethodError { | 14 patch class NoSuchMethodError { |
| 17 // The compiler emits a call to _throwNew when it cannot resolve a static | 15 // The compiler emits a call to _throwNew when it cannot resolve a static |
| 18 // method at compile time. The receiver is actually the literal class of the | 16 // method at compile time. The receiver is actually the literal class of the |
| 19 // unresolved method. | 17 // unresolved method. |
| 20 static void _throwNew(Object receiver, | 18 static void _throwNew(Object receiver, |
| 21 String memberName, | 19 String memberName, |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 "NoSuchMethodError: incorrect number of arguments passed to " | 166 "NoSuchMethodError: incorrect number of arguments passed to " |
| 169 "method named '$_memberName'\n" | 167 "method named '$_memberName'\n" |
| 170 "Receiver: $receiver_str\n" | 168 "Receiver: $receiver_str\n" |
| 171 "Tried calling: $_memberName($actualParameters)\n" | 169 "Tried calling: $_memberName($actualParameters)\n" |
| 172 "Found: $_memberName($formalParameters)"); | 170 "Found: $_memberName($formalParameters)"); |
| 173 } | 171 } |
| 174 return msg_buf.toString(); | 172 return msg_buf.toString(); |
| 175 } | 173 } |
| 176 } | 174 } |
| 177 | 175 |
| 178 class _FiftyThreeBitOverflowError extends Error with StackTraceOnThrow { | 176 class _FiftyThreeBitOverflowError extends Error { |
| 179 final Object _value; | 177 final Object _value; |
| 180 | 178 |
| 181 _FiftyThreeBitOverflowError(this._value); | 179 _FiftyThreeBitOverflowError(this._value); |
| 182 String toString() => "53-bit Overflow: $_value"; | 180 String toString() => "53-bit Overflow: $_value"; |
| 183 } | 181 } |
| OLD | NEW |