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

Unified Diff: utils/pub/error_group.dart

Issue 14251006: Remove AsyncError with Expando. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « utils/pub/command_uploader.dart ('k') | utils/pub/hosted_source.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/error_group.dart
diff --git a/utils/pub/error_group.dart b/utils/pub/error_group.dart
index 7f349a18f91c50e881c60cb8b09823f09ba410c9..ba65f6b8d97343e9bfa87d533633cd5e350ec0db 100644
--- a/utils/pub/error_group.dart
+++ b/utils/pub/error_group.dart
@@ -103,7 +103,7 @@ class ErrorGroup {
///
/// If all members of [this] have already completed successfully or with an
/// error, it's a [StateError] to try to signal an error.
- void signalError(AsyncError error) {
+ void signalError(var error) {
if (_isDone) {
throw new StateError("Can't signal errors on a complete ErrorGroup.");
}
@@ -113,7 +113,7 @@ class ErrorGroup {
/// Signal an error internally. This is just like [signalError], but instead
/// of throwing an error if [this] is complete, it just does nothing.
- void _signalError(AsyncError error) {
+ void _signalError(var error) {
if (_isDone) return;
var caught = false;
@@ -181,12 +181,12 @@ class _ErrorGroupFuture implements Future {
_completer.future.catchError((_) {});
}
- Future then(onValue(value), {onError(AsyncError asyncError)}) {
+ Future then(onValue(value), {onError(error)}) {
_hasListeners = true;
return _completer.future.then(onValue, onError: onError);
}
- Future catchError(onError(AsyncError asyncError), {bool test(Object error)}) {
+ Future catchError(onError(error), {bool test(Object error)}) {
_hasListeners = true;
return _completer.future.catchError(onError, test: test);
}
@@ -203,8 +203,8 @@ class _ErrorGroupFuture implements Future {
/// Signal that an error from [_group] should be propagated through [this],
/// unless it's already complete.
- void _signalError(AsyncError error) {
- if (!_isDone) _completer.completeError(error.error, error.stackTrace);
+ void _signalError(var error) {
+ if (!_isDone) _completer.completeError(error);
_isDone = true;
}
}
@@ -250,7 +250,7 @@ class _ErrorGroupStream extends Stream {
}
StreamSubscription listen(void onData(value),
- {void onError(AsyncError error), void onDone(),
+ {void onError(var error), void onDone(),
bool cancelOnError}) {
return _controller.stream.listen(onData,
onError: onError,
@@ -260,12 +260,12 @@ class _ErrorGroupStream extends Stream {
/// Signal that an error from [_group] should be propagated through [this],
/// unless it's already complete.
- void _signalError(AsyncError e) {
+ void _signalError(var e) {
if (_isDone) return;
_subscription.cancel();
// Call these asynchronously to work around issue 7913.
new Future.immediate(null).then((_) {
- _controller.addError(e.error, e.stackTrace);
+ _controller.addError(e);
_controller.close();
});
}
« no previous file with comments | « utils/pub/command_uploader.dart ('k') | utils/pub/hosted_source.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698