protected void Application_Error(object sender, EventArgs e) { try { Exception error = Server.GetLastError(); string message = (error.InnerException ?? error).Message; LogManager logManager = new LogManager(); logManager.CreateLog(message); CustomApplicationManager.MessageApplication = @message; Response.Redirect("~/Error.aspx"); } catch { } }
/// <summary> /// Initializes the ogre. /// </summary> protected virtual void InitializeOgre() { Configuration config = Configuration; var logManager = new LogManager(); Variables.Ogre.LogManager = logManager; Log logger = logManager.CreateLog("OGRE.log", true, false, false); Variables.Ogre.Logger = logger; var root = new Root(config.Ogre.PluginsFilename, config.Ogre.OgreConfigFilename); Variables.Ogre.Root = root; CreateWindow(root); }