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

Unified Diff: utils/pub/entrypoint.dart

Issue 14253005: Migrate pub away from throwing strings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
Index: utils/pub/entrypoint.dart
diff --git a/utils/pub/entrypoint.dart b/utils/pub/entrypoint.dart
index b162859cf49385bab3f929c8ef30496491664a69..761087103ab27b1c483b8fb8c69b6f3b0977b79f 100644
--- a/utils/pub/entrypoint.dart
+++ b/utils/pub/entrypoint.dart
@@ -87,8 +87,8 @@ class Entrypoint {
} else {
return id.source.install(id, packageDir).then((found) {
if (found) return null;
- // TODO(nweiz): More robust error-handling.
- throw 'Package ${id.name} not found in source "${id.source.name}".';
+ throw new UserFacingException('Package ${id.name} not found in '
Bob Nystrom 2013/04/18 18:18:31 That name is a bit strange. How about "PubFailure"
nweiz 2013/04/18 18:37:24 "PubFailure" sounds very generic to me. Is an unex
Bob Nystrom 2013/04/18 20:02:13 I guess so, but I'd consider that more of an under
nweiz 2013/04/18 20:12:01 Done.
+ 'source "${id.source.name}".');
});
}
}).then((_) => id.resolved);

Powered by Google App Engine
This is Rietveld 408576698