From 8231ac72eca0991d0a0a2262d37a97eb9ad23bd4 Mon Sep 17 00:00:00 2001 From: Tedd Hansen Date: Tue, 25 Sep 2007 00:22:06 +0000 Subject: [PATCH] More reorganizing of new SE. Added debug print of application exception. --- OpenSim/Grid/ScriptServer/Application.cs | 12 ++++++++++++ .../ScriptEngineInterface.cs | 0 .../ScriptEngineLoader.cs | 0 .../{ScriptEngines.cs => ScriptEnginesManager.cs} | 6 +++--- OpenSim/Grid/ScriptServer/ScriptServerMain.cs | 4 ++-- 5 files changed, 17 insertions(+), 5 deletions(-) rename OpenSim/Grid/ScriptServer/ScriptServer/{ScriptEngine => ScriptEngineManager}/ScriptEngineInterface.cs (100%) rename OpenSim/Grid/ScriptServer/ScriptServer/{ScriptEngine => ScriptEngineManager}/ScriptEngineLoader.cs (100%) rename OpenSim/Grid/ScriptServer/ScriptServer/{ScriptEngines.cs => ScriptEnginesManager.cs} (85%) diff --git a/OpenSim/Grid/ScriptServer/Application.cs b/OpenSim/Grid/ScriptServer/Application.cs index e7a6590f3a..780f0372b7 100644 --- a/OpenSim/Grid/ScriptServer/Application.cs +++ b/OpenSim/Grid/ScriptServer/Application.cs @@ -40,6 +40,18 @@ namespace OpenSim.Grid.ScriptServer { // Application is starting SE = new ScriptServerMain(); + + System.AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); + } + + static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) + { + Console.WriteLine(""); + Console.WriteLine("APPLICATION EXCEPTION DETECTED"); + Console.WriteLine(""); + Console.WriteLine("Application is terminating: " + e.IsTerminating.ToString()); + Console.WriteLine("Exception:"); + Console.WriteLine(e.ExceptionObject.ToString()); } } diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngine/ScriptEngineInterface.cs b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineManager/ScriptEngineInterface.cs similarity index 100% rename from OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngine/ScriptEngineInterface.cs rename to OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineManager/ScriptEngineInterface.cs diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngine/ScriptEngineLoader.cs b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineManager/ScriptEngineLoader.cs similarity index 100% rename from OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngine/ScriptEngineLoader.cs rename to OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineManager/ScriptEngineLoader.cs diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngines.cs b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs similarity index 85% rename from OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngines.cs rename to OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs index 0313edfd8e..faa859d356 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngines.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs @@ -5,7 +5,7 @@ using OpenSim.Framework.Console; namespace OpenSim.Grid.ScriptServer { - internal class ScriptEngines + internal class ScriptEngineManager { private LogBase m_log; private ScriptEngineLoader ScriptEngineLoader; @@ -13,7 +13,7 @@ namespace OpenSim.Grid.ScriptServer private ScriptServerMain m_ScriptServerMain; // Initialize - public ScriptEngines(ScriptServerMain scm, LogBase logger) + public ScriptEngineManager(ScriptServerMain scm, LogBase logger) { m_ScriptServerMain = scm; m_log = logger; @@ -22,7 +22,7 @@ namespace OpenSim.Grid.ScriptServer // Temp - we should not load during initialize... Loading should be done later. LoadEngine("DotNetScriptEngine"); } - ~ScriptEngines() + ~ScriptEngineManager() { } diff --git a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs b/OpenSim/Grid/ScriptServer/ScriptServerMain.cs index f85cf98648..8352859dbb 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServerMain.cs @@ -11,7 +11,7 @@ namespace OpenSim.Grid.ScriptServer { private readonly string m_logFilename = ("region-console.log"); internal RegionCommManager RegionScriptDaemon; // Listen for incoming from region - internal ScriptEngines ScriptEngines; // Loads scriptengines + internal ScriptEngineManager ScriptEngines; // Loads scriptengines private LogBase m_log; public ScriptServerMain() @@ -19,7 +19,7 @@ namespace OpenSim.Grid.ScriptServer m_log = CreateLog(); RegionScriptDaemon = new RegionCommManager(this, m_log); - ScriptEngines = new ScriptEngines(this, m_log); + ScriptEngines = new ScriptEngineManager(this, m_log); }