From be0af01061f24b714022a72573374c2178a94251 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 29 Jun 2010 23:43:38 +0100 Subject: Revert "stop exceptions in setting and getting state from propogating since they aren't fatal to operations" This reverts commit 94cb6fc916e1bd039f2b59214e68a0b3c4847445. --- .../Framework/Scenes/SceneObjectPartInventory.cs | 39 +++++----------------- 1 file changed, 8 insertions(+), 31 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index a6067ad..3a8f168 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs @@ -218,7 +218,7 @@ namespace OpenSim.Region.Framework.Scenes foreach (IScriptModule e in engines) { if (e != null) - { + { ArrayList errors = e.GetScriptErrors(itemID); foreach (Object line in errors) ret.Add(line); @@ -356,26 +356,14 @@ namespace OpenSim.Region.Framework.Scenes m_part.ParentGroup.m_savedScriptState[oldID] = newDoc.OuterXml; } - foreach (IScriptModule e in engines) { if (e != null) { - // Stop an exception in setting saved state from propogating since this is not fatal. - try - { - if (e.SetXMLState(newID, m_part.ParentGroup.m_savedScriptState[oldID])) - break; - } - catch (Exception ex) - { - m_log.WarnFormat( - "[PRIM INVENTORY]: Could not set script state for old key {0}, new key {1} in prim {2} {3}. Exception {4}{5}", - oldID, newID, m_part.Name, m_part.UUID, ex.Message, ex.StackTrace); - } + if (e.SetXMLState(newID, m_part.ParentGroup.m_savedScriptState[oldID])) + break; } } - m_part.ParentGroup.m_savedScriptState.Remove(oldID); } } @@ -1033,23 +1021,12 @@ namespace OpenSim.Region.Framework.Scenes { if (e != null) { - // Stop any exception from the script engine from propogating since setting state - // isn't essential. - try - { - string n = e.GetXMLState(item.ItemID); - if (n != String.Empty) - { - if (!ret.ContainsKey(item.ItemID)) - ret[item.ItemID] = n; - break; - } - } - catch (Exception ex) + string n = e.GetXMLState(item.ItemID); + if (n != String.Empty) { - m_log.WarnFormat( - "[PRIM INVENTORY]: Could not retrieve script state for item {0} {1} in prim {2} {3}. Exception {4}{5}", - item.Name, item.ItemID, m_part.Name, m_part.UUID, ex.Message, ex.StackTrace); + if (!ret.ContainsKey(item.ItemID)) + ret[item.ItemID] = n; + break; } } } -- cgit v1.1 From b6264e60d39b12d03e3d5e57eb07fa7a5d1a2852 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 30 Jun 2010 06:35:22 -0700 Subject: Removed opportunity for exception in BaseHttpServer. (mantis #4825) --- OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index bc31815..d261678 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs @@ -283,6 +283,10 @@ namespace OpenSim.Server.Handlers.Simulation if (m_SimulationService == null) { m_log.Debug("[AGENT HANDLER]: Agent GET called. Harmless but useless."); + responsedata["content_type"] = "application/json"; + responsedata["int_response_code"] = HttpStatusCode.NotImplemented; + responsedata["str_response_string"] = string.Empty; + return; } -- cgit v1.1