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

Unified Diff: sdk/lib/_internal/pub/lib/src/exceptions.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
Index: sdk/lib/_internal/pub/lib/src/exceptions.dart
diff --git a/sdk/lib/_internal/pub/lib/src/exceptions.dart b/sdk/lib/_internal/pub/lib/src/exceptions.dart
index 76c62390c497ee9269e4928410865be173c57152..7bbbb34faea9ab406714923f0038dfb449f3ae50 100644
--- a/sdk/lib/_internal/pub/lib/src/exceptions.dart
+++ b/sdk/lib/_internal/pub/lib/src/exceptions.dart
@@ -66,6 +66,8 @@ class UsageException extends ApplicationException {
/// This is done after the exception is created so that code outside of the
/// command can still generate usage errors.
void bindUsage(String usage) {
+ // Only bind if not already bound.
+ if (_usage != null) return;
_usage = usage;
}
}

Powered by Google App Engine
This is Rietveld 408576698