Trycatch save export

yay write protected/unplugged SD cards or bad sizes
This commit is contained in:
Kurt
2020-04-15 10:15:14 -07:00
parent 14bbc73481
commit 6e18605f69

View File

@@ -29,7 +29,17 @@ private void Menu_Open_Click(object sender, EventArgs e)
private void Menu_Save_Click(object sender, EventArgs e)
{
SaveAll();
SAV.Save((uint)DateTime.Now.Ticks);
try
{
SAV.Save((uint) DateTime.Now.Ticks);
}
#pragma warning disable CA1031 // Do not catch general exception types
catch (Exception ex)
#pragma warning restore CA1031 // Do not catch general exception types
{
WinFormsUtil.Error("Unable to save files to their original location.", ex.Message);
return;
}
WinFormsUtil.Alert("Saved all save data!");
}