Skip to content

Commit

Permalink
Catch possible exceptions triggered from buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
thekovic committed Jul 15, 2024
1 parent 01a0e3c commit 209b3a7
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions Indy3DModInstaller/ModInstallerGui.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,14 @@ await Task.Run(() =>

private void Gui_buttonSetDevMode_Click(object sender, EventArgs e)
{
Indy3DModInstaller.SetDevMode();
try
{
Indy3DModInstaller.SetDevMode();
}
catch (Exception ex)
{
Program.WriteLine(ex.Message);
}
}

private async void Gui_buttonInstall_Click(object sender, EventArgs e)
Expand Down Expand Up @@ -164,7 +171,14 @@ private async void Gui_buttonInstall_Click(object sender, EventArgs e)
{
await Task.Run(() =>
{
Indy3DModInstaller.Install(Program._installPath, Program._modPath);
try
{
Indy3DModInstaller.Install(Program._installPath, Program._modPath);
}
catch (Exception ex)
{
Program.WriteLine(ex.Message);
}
});
}
finally
Expand Down Expand Up @@ -196,7 +210,14 @@ private async void Gui_buttonUninstall_Click(object sender, EventArgs e)
{
await Task.Run(() =>
{
Indy3DModInstaller.Uninstall(Program._installPath);
try
{
Indy3DModInstaller.Uninstall(Program._installPath);
}
catch (Exception ex)
{
Program.WriteLine(ex.Message);
}
});
}
finally
Expand Down

0 comments on commit 209b3a7

Please sign in to comment.