/// <summary>Logs an error.</summary> /// <param name="sender">The object that called the event.</param> /// <param name="e">The error data to log.</param> internal static void LogError(object sender, ErrorOccurredEventArgs e) { using (var tw = new StreamWriter(Path.Combine(UserStore, "error.log"), true)) { tw.WriteLine("<--Begin-->"); tw.WriteLine(DateTime.Now + ":"); tw.WriteLine(e.Exception); tw.WriteLine("<--End-->"); tw.WriteLine(); } }
/// <summary>Occurs when a error occurs when downloading or installing updates.</summary> /// <param name="sender">The sender of the event.</param> /// <param name="e">The event data.</param> public void OnErrorOccurred(object sender, ErrorOccurredEventArgs e) { ErrorOccurred(this, e); App.LogError(sender, e); }