Example #1
0
        void CurrentDomain_FirstChanceException(object sender, FirstChanceExceptionEventArgs e)
        {
            HeartServerInfo hsInfo = this[e.Exception.Source];

            if (hsInfo != null)
            {
                hsInfo.ReceiveException(e.Exception);
            }
            else
            {
                LogServer.WriteException("Default AppDomain  First", e.Exception);

                Exception subException = e.Exception.InnerException;
                while (subException != null)
                {
                    LogServer.WriteException("InnerException First", subException);
                    subException = subException.InnerException;
                }
            }
        }
Example #2
0
        void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            Exception ex = e.ExceptionObject as Exception;

            if (ex != null)
            {
                HeartServerInfo hsInfo = this[ex.Source];
                if (hsInfo != null)
                {
                    hsInfo.ReceiveException(ex);
                }
                else
                {
                    LogServer.WriteException("Default AppDomain", ex);

                    Exception subException = ex.InnerException;
                    while (subException != null)
                    {
                        LogServer.WriteException("InnerException", subException);
                        subException = subException.InnerException;
                    }
                }
            }
        }