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

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

Issue 364973002: Fix more pub bugs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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/exceptions.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 6bc10b0e2fc99d0349bb09569da759bee37b57a4..5f0df64ae1daee3acc16c1d281e46c36e43b54da 100644
--- a/sdk/lib/_internal/pub/lib/src/command.dart
+++ b/sdk/lib/_internal/pub/lib/src/command.dart
@@ -227,6 +227,11 @@ abstract class PubCommand {
}
}
+ /// Fails with a usage error [message] for this command.
+ void usageError(String message) {
nweiz 2014/07/07 19:57:18 Does this shadow [usageError] in utils? That seems
Bob Nystrom 2014/07/07 21:02:59 Yeah. :(
+ throw new UsageException(message)..bindUsage(_getUsage());
+ }
+
/// Generates a string of usage information for this command.
String _getUsage() {
var buffer = new StringBuffer();
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/lib/src/exceptions.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698