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

Side by Side Diff: sdk/lib/_internal/pub/lib/src/utils.dart

Issue 225883004: Properly report errors with no stack traces when not using --trace. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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 | no next file » | 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 /// Generic utility functions. Stuff that should possibly be in core. 5 /// Generic utility functions. Stuff that should possibly be in core.
6 library pub.utils; 6 library pub.utils;
7 7
8 import 'dart:async'; 8 import 'dart:async';
9 import "dart:collection"; 9 import "dart:collection";
10 import "dart:convert"; 10 import "dart:convert";
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } 110 }
111 completer.completeError(e, stackTrace); 111 completer.completeError(e, stackTrace);
112 }); 112 });
113 }; 113 };
114 114
115 if (captureStackChains) { 115 if (captureStackChains) {
116 Chain.capture(wrappedCallback, onError: completer.completeError); 116 Chain.capture(wrappedCallback, onError: completer.completeError);
117 } else { 117 } else {
118 runZoned(wrappedCallback, onError: (e, stackTrace) { 118 runZoned(wrappedCallback, onError: (e, stackTrace) {
119 if (stackTrace == null) { 119 if (stackTrace == null) {
120 stackTrace = new Chain.current();
121 } else {
120 stackTrace = new Chain([new Trace.from(stackTrace)]); 122 stackTrace = new Chain([new Trace.from(stackTrace)]);
121 } else {
122 stackTrace = new Chain([]);
123 } 123 }
124 completer.completeError(e, stackTrace); 124 completer.completeError(e, stackTrace);
125 }); 125 });
126 } 126 }
127 127
128 return completer.future; 128 return completer.future;
129 } 129 }
130 130
131 /// Returns a [StreamTransformer] that will call [onDone] when the stream 131 /// Returns a [StreamTransformer] that will call [onDone] when the stream
132 /// completes. 132 /// completes.
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 error is AnalyzerErrorGroup || 861 error is AnalyzerErrorGroup ||
862 error is IsolateSpawnException || 862 error is IsolateSpawnException ||
863 error is FileSystemException || 863 error is FileSystemException ||
864 error is HttpException || 864 error is HttpException ||
865 error is http.ClientException || 865 error is http.ClientException ||
866 error is OSError || 866 error is OSError ||
867 error is ProcessException || 867 error is ProcessException ||
868 error is SocketException || 868 error is SocketException ||
869 error is WebSocketException; 869 error is WebSocketException;
870 } 870 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698