Skip to content

Commit

Permalink
Do not crash when trying to open the log file and it does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
mlaily committed Mar 31, 2017
1 parent fc0153a commit 10a3d87
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion managed-plugin/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,14 @@ private void btnCancel_Click(object sender, EventArgs e)
private void openLogLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
var startInfo = new ProcessStartInfo(Logger.GetDefaultPath()) { UseShellExecute = true };
Process.Start(startInfo);
try
{
Process.Start(startInfo);
}
catch (Exception ex)
{
Logger.Log(LogLevel.Warn, $"Unable to open log file from the configuration window: {ex.Message}");
}
}
}
}

0 comments on commit 10a3d87

Please sign in to comment.