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

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

Issue 1980573003: fix all instances of "the the" (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 | « sdk/lib/_internal/js_runtime/lib/js_string.dart ('k') | sdk/lib/async/stream.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 part of dart.async; 5 part of dart.async;
6 6
7 /** 7 /**
8 * An object representing a delayed computation. 8 * An object representing a delayed computation.
9 * 9 *
10 * A [Future] is used to represent a potential value, or error, 10 * A [Future] is used to represent a potential value, or error,
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 * and the returned future completes with the same error and stack trace 452 * and the returned future completes with the same error and stack trace
453 * as this future. 453 * as this future.
454 * 454 *
455 * If `test` returns `true`, 455 * If `test` returns `true`,
456 * [onError] is called with the error and possibly stack trace, 456 * [onError] is called with the error and possibly stack trace,
457 * and the returned future is completed with the result of this call 457 * and the returned future is completed with the result of this call
458 * in exactly the same way as for [then]'s `onError`. 458 * in exactly the same way as for [then]'s `onError`.
459 * 459 *
460 * If `test` is omitted, it defaults to a function that always returns true. 460 * If `test` is omitted, it defaults to a function that always returns true.
461 * The `test` function should not throw, but if it does, it is handled as 461 * The `test` function should not throw, but if it does, it is handled as
462 * if the the `onError` function had thrown. 462 * if the `onError` function had thrown.
463 * 463 *
464 * Example: 464 * Example:
465 * 465 *
466 * foo 466 * foo
467 * .catchError(..., test: (e) => e is ArgumentError) 467 * .catchError(..., test: (e) => e is ArgumentError)
468 * .catchError(..., test: (e) => e is NoSuchMethodError) 468 * .catchError(..., test: (e) => e is NoSuchMethodError)
469 * .then((v) { ... }); 469 * .then((v) { ... });
470 * 470 *
471 * This method is equivalent to: 471 * This method is equivalent to:
472 * 472 *
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 if (replacement != null) { 755 if (replacement != null) {
756 error = _nonNullError(replacement.error); 756 error = _nonNullError(replacement.error);
757 stackTrace = replacement.stackTrace; 757 stackTrace = replacement.stackTrace;
758 } 758 }
759 result._completeError(error, stackTrace); 759 result._completeError(error, stackTrace);
760 } 760 }
761 761
762 /** Helper function that converts `null` to a [NullThrownError]. */ 762 /** Helper function that converts `null` to a [NullThrownError]. */
763 Object _nonNullError(Object error) => 763 Object _nonNullError(Object error) =>
764 (error != null) ? error : new NullThrownError(); 764 (error != null) ? error : new NullThrownError();
OLDNEW
« no previous file with comments | « sdk/lib/_internal/js_runtime/lib/js_string.dart ('k') | sdk/lib/async/stream.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698