Fix exception on shutdown
Improve error handling during shutdown
This commit is contained in:
1 parent
2371eb4344
commit
b8bd9bf87b
4 files changed
+12
-6
No files matched your search
+9
-2
@@ -279,8 +279,15 @@ namespace Vocaluxe
|
||||
CRecord.Close();
|
||||
CSound.Close();
|
||||
CDraw.Close();
|
||||
GC.Collect(); // Do a GC run here before we close logs to have finalizers run
|
||||
CLog.CloseAll(); // Do this last, so we get all log entries!
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CLog.LogError("Error during shutdown!", false, false, e);
|
||||
}
|
||||
GC.Collect(); // Do a GC run here before we close logs to have finalizers run
|
||||
try
|
||||
{
|
||||
CLog.Close(); // Do this last, so we get all log entries!
|
||||
}
|
||||
catch (Exception) {}
|
||||
Environment.Exit(Environment.ExitCode);
|
||||
|
||||
Reference in new issue
Block a user