public void FatalExpection(string reason, Exception exception) { coreAvailable = false; coreThreadRunning = false; coreStatChanging = false; coreRestarting = false; try { log.LogFatalException(t.GetMethodName("Core") + " called for reason:'" + reason + "'", exception); } catch { } try { HandleEventException?.Invoke(exception, EventArgs.Empty); } catch { } throw new Exception("FATAL exception, Core shutting down, due to:'" + reason + "'", exception); }
public override void FatalExpection(string reason, Exception exception) { try { log.LogFatalException(t.GetMethodName() + " called for reason:'" + reason + "'", exception); } catch { } try { Thread coreRestartThread = new Thread(() => Close()); coreRestartThread.Start(); } catch { } coreRunning = false; coreStatChanging = false; try { HandleEventException?.Invoke(exception, EventArgs.Empty); } catch { } throw new Exception("FATAL exception, Core shutting down, due to:'" + reason + "'", exception); }