From 44b2ecf29db58bfdc3ecf0682cec9fc6e94dd4ee Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 11 Oct 2008 16:32:31 +0000 Subject: 2nd stab at that prim loading nasty --- OpenSim/Region/Environment/Scenes/InnerScene.cs | 2 +- OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index 1dcb174..9e41531 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs @@ -249,7 +249,7 @@ namespace OpenSim.Region.Environment.Scenes /// protected bool AddSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) { - if (sceneObject.RootPart == null) + if (sceneObject == null || sceneObject.RootPart == null || sceneObject.RootPart.UUID == null) return false; sceneObject.ApplyPhysics(m_parentScene.m_physicalPrim); diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index 1d20377..9d07de2 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs @@ -35,7 +35,7 @@ using System.Reflection; using System.Globalization; using System.Xml; using OpenMetaverse; -//using log4net; +using log4net; using Nini.Config; using Amib.Threading; using OpenSim.Framework; @@ -52,7 +52,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance { public class ScriptInstance : IScriptInstance { - //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private IScriptEngine m_Engine; private IScriptWorkItem m_CurrentResult = null; @@ -843,7 +843,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance } } - return message; + m_log.ErrorFormat("Scripting exception:"); + m_log.ErrorFormat(e.ToString()); + + return e.ToString(); } } } -- cgit v1.1