Exemple #1
0
        private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            Logger.Write("UnhandledException. Something Went Wrong");
            Exception ex = null;

            try
            {
                ex = (Exception)e.ExceptionObject;
            }
            catch (Exception) { ex = new Exception("Failed to cast 'UnhandledExceptionEventArgs' to Exception. Nomore informations on what went wrong in WPP."); }

            SendLogInformations(ex.Message);
            Environment.Exit(e.GetHashCode());
        }