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

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

Issue 16034002: Use helper methods for running pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Get rid of unnecessary RegExps in tests. Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | 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 d1f8516dfe375629ab134ecf8dfb3c412b90173f..abc2468e41e384272d55ab39d1dca46f09e7b53b 100644
--- a/sdk/lib/_internal/pub/lib/src/command.dart
+++ b/sdk/lib/_internal/pub/lib/src/command.dart
@@ -134,11 +134,11 @@ and include the results in a bug report on http://dartbug.com/new.
return commandFuture;
}).whenComplete(() => cache.deleteTempDir()).catchError((e) {
if (e is PubspecNotFoundException && e.name == null) {
- e = 'Could not find a file named "pubspec.yaml" in the directory '
- '${path.current}.';
+ 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 = 'pubspec.yaml is missing the required "name" field (e.g. "name: '
- '${path.basename(path.current)}").';
+ e = new ApplicationException('pubspec.yaml is missing the required '
+ '"name" field (e.g. "name: ${path.basename(path.current)}").');
}
handleError(e);
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/lib/src/package.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698