Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xamarin/macdoc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremie Laval <jeremie.laval@gmail.com>2012-03-30 00:12:57 +0400
committerJeremie Laval <jeremie.laval@gmail.com>2012-03-30 00:12:57 +0400
commit9d8c347f02d0e99b2f15287af8426f6ab7b0a580 (patch)
treeaa5290c6bab3130d94e94945956ad9b4291ec89c
parent278ad061f15e8385102726280b9dcc1215fbdfe9 (diff)
[appledocwizard] Log errors in a file if possible
-rw-r--r--AppleDocWizard/AppleDocWizardController.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/AppleDocWizard/AppleDocWizardController.cs b/AppleDocWizard/AppleDocWizardController.cs
index 4e95423..aa430e8 100644
--- a/AppleDocWizard/AppleDocWizardController.cs
+++ b/AppleDocWizard/AppleDocWizardController.cs
@@ -64,9 +64,11 @@ namespace macdoc
ShowAlert (FinishState.NothingToDo);
}
}).ContinueWith (t => {
- Console.WriteLine ("Exception occured during doc process");
- Console.WriteLine ();
- Console.WriteLine (t.Exception.ToString ());
+ var errorLog = string.Format ("Exception occured during doc process{0}{1}", Environment.NewLine, t.Exception.ToString ());
+ Console.WriteLine (errorLog);
+ try {
+ System.IO.File.WriteAllText (LogFile, errorLog);
+ } catch {}
ShowAlert (FinishState.Error);
}, TaskContinuationOptions.OnlyOnFaulted);
}