Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: runtime/lib/errors_patch.dart

Issue 18259021: Introduce StackTraceOnThrowMixin. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/tests/vm/dart/isolate_mirror_local_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 StackTraceOnThrow {
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
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 StackTraceOnThrow {
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 }
OLDNEW
« no previous file with comments | « no previous file | runtime/tests/vm/dart/isolate_mirror_local_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698