Show message box if GUI crashes

mac
Miepee 3 years ago
parent ba49e414a2
commit dbe65e0852

@ -153,6 +153,8 @@ public partial class MainForm : Form
string iconPath = RawMods.GetProperPathToBuiltinIcons(nameof(Resources.icon), userIconPath); string iconPath = RawMods.GetProperPathToBuiltinIcons(nameof(Resources.icon), userIconPath);
string splashPath = RawMods.GetProperPathToBuiltinIcons(nameof(Resources.splash), userSplashPath); string splashPath = RawMods.GetProperPathToBuiltinIcons(nameof(Resources.splash), userSplashPath);
try
{
if (checkboxLinux.Checked.Value) if (checkboxLinux.Checked.Value)
{ {
if (File.Exists(linuxPath)) if (File.Exists(linuxPath))
@ -174,12 +176,17 @@ public partial class MainForm : Form
if (File.Exists(macPath)) if (File.Exists(macPath))
File.Delete(macPath); File.Delete(macPath);
string modName = checkboxUseCustomSave.Text;
await Task.Run(() => RawMods.PortToMac(modZipPath, macPath, iconPath, splashPath, OutputHandlerDelegate)); await Task.Run(() => RawMods.PortToMac(modZipPath, macPath, iconPath, splashPath, OutputHandlerDelegate));
} }
labelProgress.Text = "Done!"; labelProgress.Text = "Done!";
OpenFolder(currentDir); OpenFolder(currentDir);
}
catch (Exception exception)
{
MessageBox.Show(this, "Stack Trace: " + exception, "Error", MessageBoxType.Error);
throw;
}
SetDisableStatusOfAllElements(false); SetDisableStatusOfAllElements(false);
} }

Loading…
Cancel
Save