More reorganizing of new SE. Added debug print of application exception.

afrisby
Tedd Hansen 2007-09-25 00:22:06 +00:00
parent 3ac43d0120
commit 8231ac72ec
5 changed files with 17 additions and 5 deletions

View File

@ -40,6 +40,18 @@ namespace OpenSim.Grid.ScriptServer
{ {
// Application is starting // Application is starting
SE = new ScriptServerMain(); 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());
} }
} }

View File

@ -5,7 +5,7 @@ using OpenSim.Framework.Console;
namespace OpenSim.Grid.ScriptServer namespace OpenSim.Grid.ScriptServer
{ {
internal class ScriptEngines internal class ScriptEngineManager
{ {
private LogBase m_log; private LogBase m_log;
private ScriptEngineLoader ScriptEngineLoader; private ScriptEngineLoader ScriptEngineLoader;
@ -13,7 +13,7 @@ namespace OpenSim.Grid.ScriptServer
private ScriptServerMain m_ScriptServerMain; private ScriptServerMain m_ScriptServerMain;
// Initialize // Initialize
public ScriptEngines(ScriptServerMain scm, LogBase logger) public ScriptEngineManager(ScriptServerMain scm, LogBase logger)
{ {
m_ScriptServerMain = scm; m_ScriptServerMain = scm;
m_log = logger; m_log = logger;
@ -22,7 +22,7 @@ namespace OpenSim.Grid.ScriptServer
// Temp - we should not load during initialize... Loading should be done later. // Temp - we should not load during initialize... Loading should be done later.
LoadEngine("DotNetScriptEngine"); LoadEngine("DotNetScriptEngine");
} }
~ScriptEngines() ~ScriptEngineManager()
{ {
} }

View File

@ -11,7 +11,7 @@ namespace OpenSim.Grid.ScriptServer
{ {
private readonly string m_logFilename = ("region-console.log"); private readonly string m_logFilename = ("region-console.log");
internal RegionCommManager RegionScriptDaemon; // Listen for incoming from region internal RegionCommManager RegionScriptDaemon; // Listen for incoming from region
internal ScriptEngines ScriptEngines; // Loads scriptengines internal ScriptEngineManager ScriptEngines; // Loads scriptengines
private LogBase m_log; private LogBase m_log;
public ScriptServerMain() public ScriptServerMain()
@ -19,7 +19,7 @@ namespace OpenSim.Grid.ScriptServer
m_log = CreateLog(); m_log = CreateLog();
RegionScriptDaemon = new RegionCommManager(this, m_log); RegionScriptDaemon = new RegionCommManager(this, m_log);
ScriptEngines = new ScriptEngines(this, m_log); ScriptEngines = new ScriptEngineManager(this, m_log);
} }