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

Side by Side Diff: sdk/lib/async/async_error.dart

Issue 12213092: Rework Timer interface. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 10 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
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 part of dart.async; 5 part of dart.async;
6 6
7 /** 7 /**
8 * Error result of an asynchronous computation. 8 * Error result of an asynchronous computation.
9 */ 9 */
10 class AsyncError { 10 class AsyncError {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 throwDelayed() { 53 throwDelayed() {
54 reportError() { 54 reportError() {
55 print("Uncaught Error: $error"); 55 print("Uncaught Error: $error");
56 if (stackTrace != null) { 56 if (stackTrace != null) {
57 print("Stack Trace:\n$stackTrace\n"); 57 print("Stack Trace:\n$stackTrace\n");
58 } 58 }
59 } 59 }
60 60
61 try { 61 try {
62 new Timer(0, (_) { 62 Timer.run(() {
63 reportError(); 63 reportError();
64 // TODO(floitsch): we potentially want to call the global error handler 64 // TODO(floitsch): we potentially want to call the global error handler
65 // directly so that we can pass the stack trace. 65 // directly so that we can pass the stack trace.
66 throw error; 66 throw error;
67 }); 67 });
68 } catch (e) { 68 } catch (e) {
69 // Unfortunately there is not much more we can do... 69 // Unfortunately there is not much more we can do...
70 reportError(); 70 reportError();
71 } 71 }
72 } 72 }
73 } 73 }
74 74
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/lib/mirrors_patch.dart ('k') | sdk/lib/async/future.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698