More robust error handling, especially before logging can be initialized

This commit is contained in:
Robert McRackan 2021-09-23 09:19:35 -04:00
parent 61385f0f0b
commit 4fd16f04e0
5 changed files with 100 additions and 34 deletions

View file

@ -33,10 +33,37 @@ namespace LibationWinForms.Dialogs
}
private void githubLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
=> Go.To.Url("https://github.com/rmcrackan/Libation/issues");
{
var url = "https://github.com/rmcrackan/Libation/issues";
try
{
Go.To.Url(url);
}
catch
{
MessageBox.Show($"Error opening url\r\n{url}", "Error opening url", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void logsLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
=> Go.To.Folder(FileManager.Configuration.Instance.LibationFiles);
{
string dir = "";
try
{
dir = FileManager.Configuration.Instance.LibationFiles;
}
catch { }
try
{
Go.To.Folder(dir);
}
catch
{
MessageBox.Show($"Error opening folder\r\n{dir}", "Error opening folder", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void okBtn_Click(object sender, EventArgs e)
{