From 8231ac72eca0991d0a0a2262d37a97eb9ad23bd4 Mon Sep 17 00:00:00 2001 From: Tedd Hansen Date: Tue, 25 Sep 2007 00:22:06 +0000 Subject: More reorganizing of new SE. Added debug print of application exception. --- OpenSim/Grid/ScriptServer/Application.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'OpenSim/Grid/ScriptServer/Application.cs') diff --git a/OpenSim/Grid/ScriptServer/Application.cs b/OpenSim/Grid/ScriptServer/Application.cs index e7a6590..780f037 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()); } } -- cgit v1.1