mirror of
https://github.com/thegeneralist01/Scene-Manager-DevRepo
synced 2026-01-11 15:40:29 +01:00
Added try/catch for autosave
This commit is contained in:
parent
fff7e14601
commit
b73b8d0987
1 changed files with 10 additions and 1 deletions
|
|
@ -42,11 +42,20 @@ namespace SceneManager
|
||||||
|
|
||||||
private static void TerminationHandler(object sender, EventArgs e)
|
private static void TerminationHandler(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ExportPathMenu.ExportOnUnload();
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
Game.LogTrivial($"Autosave error: {ex.Message}");
|
||||||
|
Game.DisplayNotification($"~o~Scene Manager ~r~[Error]\n~w~There was a problem autosaving the paths.");
|
||||||
|
}
|
||||||
BarrierMenu.Cleanup();
|
BarrierMenu.Cleanup();
|
||||||
PathManager.DeleteAllPaths();
|
PathManager.DeleteAllPaths();
|
||||||
|
|
||||||
Game.LogTrivial($"Plugin has shut down.");
|
Game.LogTrivial($"Plugin has shut down.");
|
||||||
Game.DisplayNotification($"~o~Scene Manager ~r~[Terminated]\n~w~The plugin has shut down.");
|
//Game.DisplayNotification($"~o~Scene Manager ~r~[Terminated]\n~w~The plugin has shut down.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue