Beispiel #1
0
        public static void ShowOgreException(SEHException sex)
        {
            if (OgreException.IsThrown)
            {
                // already logged
                //LogManager.Singleton.LogMessage("Ogre exception thrown, going to kill game: " + OgreException.LastException.FullDescription + ", Trace: "+ sex.ToString());


                string outputFilename = EngineConfig.CopyLogFileToErrorLogFile();

                string info = "Sorry guys, something went wrong! :/";
                if (OgreException.LastException.Description.Contains("failed to draw primitive") || OgreException.LastException.FullDescription.Contains("failed to draw primitive"))
                {
                    info +=
                        "\r\nThis error is related to your graphics card driver. Try to update drivers. Some of Intel cards (GMA 945) might not be able to handle the game.";
                }


                info += "\r\nError has been logged to: " + outputFilename + "\r\n. Please attach all the files in case of reporting a bug\r\n";
                info += "\r\nOgre exception thrown: " + OgreException.LastException.FullDescription + ", Trace in WOF: " + sex.ToString() + "\r\n";

                ErrorBox errorBox = new ErrorBox(EngineConfig.C_GAME_NAME + " v." + EngineConfig.C_WOF_VERSION + " - Engine error", info);
                errorBox.ShowDialog(FrameWorkForm.ActiveForm);

                /*  MessageBox.Show(OgreException.LastException.FullDescription + info, EngineConfig.C_GAME_NAME + " - Engine error",
                 *               MessageBoxButtons.OK, MessageBoxIcon.Error);*/
            }
        }