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

Unified Diff: utils/pub/command_lish.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/apidoc/apidoc.dart ('k') | utils/pub/command_uploader.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/command_lish.dart
diff --git a/utils/pub/command_lish.dart b/utils/pub/command_lish.dart
index 1948ba163a37f80530a02c2955b5eaeaee08a6e8..8fa94df4c43a21c6474a0f94f2fe901a202315c9 100644
--- a/utils/pub/command_lish.dart
+++ b/utils/pub/command_lish.dart
@@ -83,18 +83,18 @@ class LishCommand extends PubCommand {
return location;
}).then((location) => client.get(location))
.then(handleJsonSuccess);
- }).catchError((asyncError) {
- if (asyncError.error is! PubHttpException) throw asyncError;
- var url = asyncError.error.response.request.url;
+ }).catchError((error) {
+ if (error is! PubHttpException) throw error;
+ var url = error.response.request.url;
if (urisEqual(url, cloudStorageUrl)) {
// TODO(nweiz): the response may have XML-formatted information about
// the error. Try to parse that out once we have an easily-accessible
// XML parser.
throw 'Failed to upload the package.';
} else if (urisEqual(Uri.parse(url.origin), Uri.parse(server.origin))) {
- handleJsonError(asyncError.error.response);
+ handleJsonError(error.response);
} else {
- throw asyncError;
+ throw error;
}
});
}
« no previous file with comments | « utils/apidoc/apidoc.dart ('k') | utils/pub/command_uploader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698