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

Side by Side Diff: lib/src/errors.dart

Issue 1025293003: pkg/isolate: library renaming, removed unused method, fix creation of TimeoutException (Closed) Base URL: https://github.com/dart-lang/isolate.git@master
Patch Set: nits Created 5 years, 9 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
« no previous file with comments | « lib/runner.dart ('k') | lib/src/lists.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 // TODO(lrn): This should be in package:async? 5 // TODO(lrn): This should be in package:async?
6 /// Helper functions for working with errors. 6 /// Helper functions for working with errors.
7 /// 7 ///
8 /// The [MultiError] class combines multiple errors into one object, 8 /// The [MultiError] class combines multiple errors into one object,
9 /// and the [MultiError.wait] function works like [Future.wait] except 9 /// and the [MultiError.wait] function works like [Future.wait] except
10 /// that it returns all the errors. 10 /// that it returns all the errors.
11 library pkg.isolate.errors; 11 library isolate.errors;
12 12
13 import "dart:async"; 13 import 'dart:async';
14 14
15 class MultiError extends Error { 15 class MultiError extends Error {
16 // Limits the number of lines included from each error's error message. 16 // Limits the number of lines included from each error's error message.
17 // A best-effort attempt is made at keeping below this number of lines 17 // A best-effort attempt is made at keeping below this number of lines
18 // in the output. 18 // in the output.
19 // If there are too many errors, they will all get at least one line. 19 // If there are too many errors, they will all get at least one line.
20 static const int _MAX_LINES = 55; 20 static const int _MAX_LINES = 55;
21 // Minimum number of lines in the toString for each error. 21 // Minimum number of lines in the toString for each error.
22 static const int _MIN_LINES_PER_ERROR = 1; 22 static const int _MIN_LINES_PER_ERROR = 1;
23 23
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 } 169 }
170 buffer.write("#$index: "); 170 buffer.write("#$index: ");
171 buffer.write(errorString.substring(0, end)); 171 buffer.write(errorString.substring(0, end));
172 if (end < errorString.length) { 172 if (end < errorString.length) {
173 buffer.write("...\n"); 173 buffer.write("...\n");
174 } 174 }
175 } 175 }
176 return buffer.toString(); 176 return buffer.toString();
177 } 177 }
178 } 178 }
OLDNEW
« no previous file with comments | « lib/runner.dart ('k') | lib/src/lists.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698