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