* Stop an exception in the Content Management module main loop from crashing the whole sim

0.6.0-stable
Justin Clarke Casey 2008-11-04 21:30:57 +00:00
parent 09dabb2aec
commit 8851db0a0a
1 changed files with 44 additions and 34 deletions

View File

@ -161,6 +161,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
/// Run in a thread of its own. A endless loop that consumes (or blocks on) and work queue. Thw work queue is filled through client actions. /// Run in a thread of its own. A endless loop that consumes (or blocks on) and work queue. Thw work queue is filled through client actions.
/// </summary> /// </summary>
private void MainLoop() private void MainLoop()
{
try
{ {
CMModel model = m_model; CMView view = m_view; int channel = m_channel; CMModel model = m_model; CMView view = m_view; int channel = m_channel;
Work currentJob = new Work(); Work currentJob = new Work();
@ -201,6 +203,14 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
} }
} }
} }
catch (Exception e)
{
// TODO: Let users in the sim and those entering it and possibly an external watchdog know what has happened
m_log.ErrorFormat(
"[CONTENT MANAGEMENT]: Content management thread terminating with exception. PLEASE REBOOT YOUR SIM - CONTENT MANAGEMENT WILL NOT BE AVAILABLE UNTIL YOU DO. Exception is {0}",
e);
}
}
/// <summary> /// <summary>
/// Only called by the MainLoop. Updates the view of a new client with metaentities if diff-mode is currently enabled. /// Only called by the MainLoop. Updates the view of a new client with metaentities if diff-mode is currently enabled.