aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs39
1 files changed, 31 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index d175695..5ab7d20 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -217,7 +217,7 @@ namespace OpenSim.Region.Framework.Scenes
217 foreach (IScriptModule e in engines) 217 foreach (IScriptModule e in engines)
218 { 218 {
219 if (e != null) 219 if (e != null)
220 { 220 {
221 ArrayList errors = e.GetScriptErrors(itemID); 221 ArrayList errors = e.GetScriptErrors(itemID);
222 foreach (Object line in errors) 222 foreach (Object line in errors)
223 ret.Add(line); 223 ret.Add(line);
@@ -359,14 +359,26 @@ namespace OpenSim.Region.Framework.Scenes
359 359
360 m_part.ParentGroup.m_savedScriptState[oldID] = newDoc.OuterXml; 360 m_part.ParentGroup.m_savedScriptState[oldID] = newDoc.OuterXml;
361 } 361 }
362
362 foreach (IScriptModule e in engines) 363 foreach (IScriptModule e in engines)
363 { 364 {
364 if (e != null) 365 if (e != null)
365 { 366 {
366 if (e.SetXMLState(newID, m_part.ParentGroup.m_savedScriptState[oldID])) 367 // Stop an exception in setting saved state from propogating since this is not fatal.
367 break; 368 try
369 {
370 if (e.SetXMLState(newID, m_part.ParentGroup.m_savedScriptState[oldID]))
371 break;
372 }
373 catch (Exception ex)
374 {
375 m_log.WarnFormat(
376 "[PRIM INVENTORY]: Could not set script state for old key {0}, new key {1} in prim {2} {3}. Exception {4}{5}",
377 oldID, newID, m_part.Name, m_part.UUID, ex.Message, ex.StackTrace);
378 }
368 } 379 }
369 } 380 }
381
370 m_part.ParentGroup.m_savedScriptState.Remove(oldID); 382 m_part.ParentGroup.m_savedScriptState.Remove(oldID);
371 } 383 }
372 } 384 }
@@ -1028,12 +1040,23 @@ namespace OpenSim.Region.Framework.Scenes
1028 { 1040 {
1029 if (e != null) 1041 if (e != null)
1030 { 1042 {
1031 string n = e.GetXMLState(item.ItemID); 1043 // Stop any exception from the script engine from propogating since setting state
1032 if (n != String.Empty) 1044 // isn't essential.
1045 try
1046 {
1047 string n = e.GetXMLState(item.ItemID);
1048 if (n != String.Empty)
1049 {
1050 if (!ret.ContainsKey(item.ItemID))
1051 ret[item.ItemID] = n;
1052 break;
1053 }
1054 }
1055 catch (Exception ex)
1033 { 1056 {
1034 if (!ret.ContainsKey(item.ItemID)) 1057 m_log.WarnFormat(
1035 ret[item.ItemID] = n; 1058 "[PRIM INVENTORY]: Could not retrieve script state for item {0} {1} in prim {2} {3}. Exception {4}{5}",
1036 break; 1059 item.Name, item.ItemID, m_part.Name, m_part.UUID, ex.Message, ex.StackTrace);
1037 } 1060 }
1038 } 1061 }
1039 } 1062 }