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

Unified Diff: sdk/lib/io/process.dart

Issue 11417028: Include command in ProcessException. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment Created 8 years, 1 month 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 | « runtime/bin/process_patch.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/process.dart
diff --git a/sdk/lib/io/process.dart b/sdk/lib/io/process.dart
index 8d6d9f23026f2ea92fd31bfd8e7626a98eebb113..f2062df562aa9f937731c494d2eef21edfa52253 100644
--- a/sdk/lib/io/process.dart
+++ b/sdk/lib/io/process.dart
@@ -214,8 +214,25 @@ class ProcessSignal {
class ProcessException implements Exception {
- const ProcessException([String this.message = "", int this.errorCode = 0]);
- String toString() => "ProcessException: $message ($errorCode)";
+ const ProcessException(String this.executable,
+ List<String> this.arguments,
+ [String this.message = "",
+ int this.errorCode = 0]);
+ String toString() {
+ var msg = (message == null) ? 'OS error code: $errorCode' : message;
+ var args = Strings.join(arguments, ' ');
+ return "ProcessException: $msg\n Command: $executable $args";
+ }
+
+ /**
+ * Contains the executable provided for the process.
+ */
+ final String executable;
+
+ /**
+ * Contains the arguments provided for the process.
+ */
+ final List<String> arguments;
/**
* Contains the system message for the process exception if any.
« no previous file with comments | « runtime/bin/process_patch.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698