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

Unified Diff: sdk/lib/_internal/pub_generated/lib/src/exceptions.dart

Issue 805393002: Update pub to use the new command runner API in args. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 5 years, 11 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_generated/lib/src/exceptions.dart
diff --git a/sdk/lib/_internal/pub_generated/lib/src/exceptions.dart b/sdk/lib/_internal/pub_generated/lib/src/exceptions.dart
index dd2fb6ca4d1f5ca7cc0687ab81b6fefb362fdbd3..7d4f5a39b924a01604f200ad93a0e146350f8edb 100644
--- a/sdk/lib/_internal/pub_generated/lib/src/exceptions.dart
+++ b/sdk/lib/_internal/pub_generated/lib/src/exceptions.dart
@@ -8,6 +8,7 @@ import 'dart:io';
import 'dart:isolate';
import "package:analyzer/analyzer.dart";
+import 'package:args/command_runner.dart';
import "package:http/http.dart" as http;
import "package:stack_trace/stack_trace.dart";
import "package:yaml/yaml.dart";
@@ -61,17 +62,6 @@ class SilentException extends WrappedException {
: super(innerError.toString(), innerError, innerTrace);
}
-/// A class for command usage exceptions.
-class UsageException extends ApplicationException {
- /// The command usage information.
- String _usage;
-
- UsageException(String message, this._usage)
- : super(message);
-
- String toString() => "$message\n\n$_usage";
-}
-
/// A class for errors in a command's input data.
///
/// This corresponds to the [exit_codes.DATA] exit code.
@@ -130,5 +120,6 @@ bool isUserFacingException(error) {
error is IsolateSpawnException ||
error is IOException ||
error is http.ClientException ||
- error is YamlException;
+ error is YamlException ||
+ error is UsageException;
}
« no previous file with comments | « sdk/lib/_internal/pub_generated/lib/src/command_runner.dart ('k') | sdk/lib/_internal/pub_generated/lib/src/log.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698