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

Unified Diff: sdk/lib/_internal/pub/lib/src/command.dart

Issue 24246002: Lazily throw pubspec parsing exceptions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 7 years, 3 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 | « sdk/lib/_internal/pub/lib/src/barback.dart ('k') | sdk/lib/_internal/pub/lib/src/package.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/command.dart
diff --git a/sdk/lib/_internal/pub/lib/src/command.dart b/sdk/lib/_internal/pub/lib/src/command.dart
index 2375bfed28fdd3d50733cdef5293fed88130798e..9362df07eb114f46a6783e6b5ccdc8b704d9da7d 100644
--- a/sdk/lib/_internal/pub/lib/src/command.dart
+++ b/sdk/lib/_internal/pub/lib/src/command.dart
@@ -129,17 +129,9 @@ and include the results in a bug report on http://dartbug.com/new.
if (commandFuture == null) return true;
return commandFuture;
- }).whenComplete(() => cache.deleteTempDir()).catchError((e) {
- if (e is PubspecNotFoundException && e.name == null) {
- e = new ApplicationException('Could not find a file named '
- '"pubspec.yaml" in the directory ${path.current}.');
- } else if (e is PubspecHasNoNameException && e.name == null) {
- e = new ApplicationException('pubspec.yaml is missing the required '
- '"name" field (e.g. "name: ${path.basename(path.current)}").');
- }
-
- return handleError(e);
- }).then((_) {
+ }).whenComplete(() => cache.deleteTempDir())
+ .catchError(handleError)
+ .then((_) {
// Explicitly exit on success to ensure that any dangling dart:io handles
// don't cause the process to never terminate.
return flushThenExit(0);
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/barback.dart ('k') | sdk/lib/_internal/pub/lib/src/package.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698