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

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

Issue 354763006: Add a "pub global run" command. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise! 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
Index: sdk/lib/_internal/pub/lib/src/utils.dart
diff --git a/sdk/lib/_internal/pub/lib/src/utils.dart b/sdk/lib/_internal/pub/lib/src/utils.dart
index b3d585db92a97b0ebc12d379dd741e25fa0fe382..68c0c74188ba3c9add56553c9b6146d2dcf1dad0 100644
--- a/sdk/lib/_internal/pub/lib/src/utils.dart
+++ b/sdk/lib/_internal/pub/lib/src/utils.dart
@@ -845,6 +845,7 @@ void fail(String message, [innerError, StackTrace innerTrace]) {
/// failed because of invalid input data.
///
/// This will report the error and cause pub to exit with [exit_codes.DATA].
-void dataError(String message) {
- throw new DataException(message);
-}
+void dataError(String message) => throw new DataException(message);
+
+/// Throw a [UsageException] for a usage error of a command with [message].
+void usageError(String message) => throw new UsageException(message);
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/global_packages.dart ('k') | sdk/lib/_internal/pub/lib/src/validator/dependency.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698