Add some error messages

This commit is contained in:
Paul Lange 2011-03-06 16:07:16 +01:00
parent 09df631e5b
commit 8a2694feaa

View file

@ -37,6 +37,7 @@ namespace SparkleLib {
private string TargetFolder;
private string RemoteOriginUrl;
private string Command_Error;
public SparkleFetcher (string url, string folder)
{
@ -70,12 +71,16 @@ namespace SparkleLib {
process.StartInfo.Arguments = "clone --progress " +
"\"" + RemoteOriginUrl + "\" " + "\"" + TargetFolder + "\"";
SparkleHelpers.DebugInfo ("Cmd", "git clone --progress " +
"\"" + RemoteOriginUrl + "\" " + "\"" + TargetFolder + "\"");
process.Exited += delegate {
SparkleHelpers.DebugInfo ("Git", "Exit code " + process.ExitCode.ToString ());
if (process.ExitCode != 0) {
SparkleHelpers.DebugInfo ("Git", "Error: " + Command_Error);
SparkleHelpers.DebugInfo ("Git", "[" + TargetFolder + "] Cloning failed");
if (CloningFailed != null)
@ -96,8 +101,8 @@ namespace SparkleLib {
};
process.Start ();
process.BeginErrorReadLine ();
Command_Error = process.StandardError.ReadToEnd ();
process.WaitForExit ();
}