diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 39 |
1 files changed, 8 insertions, 31 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 5ab7d20..d175695 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,26 +359,14 @@ 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 | |||
363 | foreach (IScriptModule e in engines) | 362 | foreach (IScriptModule e in engines) |
364 | { | 363 | { |
365 | if (e != null) | 364 | if (e != null) |
366 | { | 365 | { |
367 | // Stop an exception in setting saved state from propogating since this is not fatal. | 366 | if (e.SetXMLState(newID, m_part.ParentGroup.m_savedScriptState[oldID])) |
368 | try | 367 | break; |
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 | } | ||
379 | } | 368 | } |
380 | } | 369 | } |
381 | |||
382 | m_part.ParentGroup.m_savedScriptState.Remove(oldID); | 370 | m_part.ParentGroup.m_savedScriptState.Remove(oldID); |
383 | } | 371 | } |
384 | } | 372 | } |
@@ -1040,23 +1028,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
1040 | { | 1028 | { |
1041 | if (e != null) | 1029 | if (e != null) |
1042 | { | 1030 | { |
1043 | // Stop any exception from the script engine from propogating since setting state | 1031 | string n = e.GetXMLState(item.ItemID); |
1044 | // isn't essential. | 1032 | if (n != String.Empty) |
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) | ||
1056 | { | 1033 | { |
1057 | m_log.WarnFormat( | 1034 | if (!ret.ContainsKey(item.ItemID)) |
1058 | "[PRIM INVENTORY]: Could not retrieve script state for item {0} {1} in prim {2} {3}. Exception {4}{5}", | 1035 | ret[item.ItemID] = n; |
1059 | item.Name, item.ItemID, m_part.Name, m_part.UUID, ex.Message, ex.StackTrace); | 1036 | break; |
1060 | } | 1037 | } |
1061 | } | 1038 | } |
1062 | } | 1039 | } |