# HG changeset patch # User Alys Brooks # Date 2021-08-07 09:57:08 # Node ID f870838ea49ed1538b3108513954fcadc3e49eac # Parent fccc867f55105e3615c6a38eee7bf1c3c67fb3ef Add generic error handler. diff --git a/isometric-park-fna/FNAGame.cs b/isometric-park-fna/FNAGame.cs --- a/isometric-park-fna/FNAGame.cs +++ b/isometric-park-fna/FNAGame.cs @@ -115,8 +115,15 @@ #if NETCOREAPP DllMap.Initialise(false); #endif - using FNAGame g = new FNAGame(); - g.Run(); + try { + using FNAGame g = new FNAGame(); + g.Run(); + } + catch (Exception e) + { + Logging.Critical(string.Format("Unhandled exception: {0}", e)); + return; + } #if !DEBUG Logging.logFile.Close();