コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }