[chronojump/execute-process: 3/5] Makes executeProcess always return Result instead of returning the string result.
- From: Carles Pina i Estany <carlespina src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump/execute-process: 3/5] Makes executeProcess always return Result instead of returning the string result.
- Date: Tue, 4 Oct 2016 22:26:08 +0000 (UTC)
commit ef402174ad1a37912209fdbe910d482bf8058c9b
Author: Carles Pina i Estany <carles pina cat>
Date: Wed Oct 5 00:02:47 2016 +0200
Makes executeProcess always return Result instead of returning the string result.
src/executeProcess.cs | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/executeProcess.cs b/src/executeProcess.cs
index 36ba52b..3404374 100644
--- a/src/executeProcess.cs
+++ b/src/executeProcess.cs
@@ -51,16 +51,15 @@ class ExecuteProcess
}
};
- public static string runShowError(string file_name, List<string> parameters)
+ public static Result runShowErrorIfNotStarted(string file_name, List<string> parameters)
{
Result result = run(file_name, parameters);
if (result.exitCode == Result.ERROR_CANT_START) {
new DialogMessage (Constants.MessageTypes.WARNING, result.errorMessage);
- return "";
- } else {
- return result.allOutput;
}
+
+ return result;
}
public static Result run(string file_name, List<string> parameters)
@@ -116,6 +115,10 @@ class ExecuteProcess
process.WaitForExit ();
+ if (stderr != "") {
+ LogB.Warning(String.Format("Executed: {0} Parameters: {1} Stdout: {2} Stderr: {3}",
processStartInfo.FileName, parameters_string, stdout, stderr));
+ }
+
int exitCode = process.ExitCode;
return new Result (stdout, stderr, exitCode);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]