diff options
author | SignpostMarv | 2012-07-16 14:47:03 +0100 |
---|---|---|
committer | Melanie | 2012-07-16 21:32:38 +0100 |
commit | ee7478fa16b95352db22e0eba5c4cb90d47dabd5 (patch) | |
tree | bec8a5f5721c3449667e675061b7a16b022cc470 /OpenSim/Region | |
parent | update PrimMesher.cs to dll version r72 which fixes some path errors in slice... (diff) | |
download | opensim-SC-ee7478fa16b95352db22e0eba5c4cb90d47dabd5.zip opensim-SC-ee7478fa16b95352db22e0eba5c4cb90d47dabd5.tar.gz opensim-SC-ee7478fa16b95352db22e0eba5c4cb90d47dabd5.tar.bz2 opensim-SC-ee7478fa16b95352db22e0eba5c4cb90d47dabd5.tar.xz |
sending more user-friendly messages to the script error window rather than the thrown exceptions.
Signed-off-by: Melanie <melanie@t-data.com>
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 3654106..4137397 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -1664,9 +1664,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1664 | CheckThreatLevel(ThreatLevel.Low, "osMessageObject"); | 1664 | CheckThreatLevel(ThreatLevel.Low, "osMessageObject"); |
1665 | m_host.AddScriptLPS(1); | 1665 | m_host.AddScriptLPS(1); |
1666 | 1666 | ||
1667 | UUID objUUID; | ||
1668 | if (!UUID.TryParse(objectUUID, out objUUID)) // prior to patching, a thrown exception regarding invalid GUID format would be shouted instead. | ||
1669 | { | ||
1670 | OSSLShoutError("osMessageObject() cannot send messages to objects with invalid UUIDs"); | ||
1671 | return; | ||
1672 | } | ||
1673 | |||
1667 | object[] resobj = new object[] { new LSL_Types.LSLString(m_host.UUID.ToString()), new LSL_Types.LSLString(message) }; | 1674 | object[] resobj = new object[] { new LSL_Types.LSLString(m_host.UUID.ToString()), new LSL_Types.LSLString(message) }; |
1668 | 1675 | ||
1669 | SceneObjectPart sceneOP = World.GetSceneObjectPart(new UUID(objectUUID)); | 1676 | SceneObjectPart sceneOP = World.GetSceneObjectPart(objUUID); |
1677 | |||
1678 | if (sceneOP == null) // prior to patching, PostObjectEvent() would cause a throw exception to be shouted instead. | ||
1679 | { | ||
1680 | OSSLShoutError("osMessageObject() cannot send message to " + objUUID.ToString() + ", object was not found in scene."); | ||
1681 | return; | ||
1682 | } | ||
1670 | 1683 | ||
1671 | m_ScriptEngine.PostObjectEvent( | 1684 | m_ScriptEngine.PostObjectEvent( |
1672 | sceneOP.LocalId, new EventParams( | 1685 | sceneOP.LocalId, new EventParams( |