From fc35b45e2176ee2dc8bf5627e84e463a2e9d3a52 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 13 Feb 2014 23:55:38 +0000 Subject: If calls to UserAgentServiceConnector fail then throw an exception. This lets the caller decide whether to discard the error or not. This is Oren Hurvitz's 0001 patch from http://opensimulator.org/mantis/view.php?id=6956 but I ended up doing some tweaking to resolve patch application issues. --- .../Framework/EntityTransfer/HGEntityTransferModule.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs') diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 04a0db6..b752639 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs @@ -1,4 +1,4 @@ -/* +/* * Copyright (c) Contributors, http://opensimulator.org/ * See CONTRIBUTORS.TXT for a full list of copyright holders. * @@ -462,7 +462,17 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer IUserAgentService userAgentService = new UserAgentServiceConnector(aCircuit.ServiceURLs["HomeURI"].ToString()); Vector3 position = Vector3.UnitY, lookAt = Vector3.UnitY; - GridRegion finalDestination = userAgentService.GetHomeRegion(aCircuit.AgentID, out position, out lookAt); + + GridRegion finalDestination = null; + try + { + finalDestination = userAgentService.GetHomeRegion(aCircuit.AgentID, out position, out lookAt); + } + catch (Exception e) + { + m_log.Warn("[HG ENTITY TRANSFER MODULE]: GetHomeRegion call failed ", e); + } + if (finalDestination == null) { client.SendTeleportFailed("Your home region could not be found"); -- cgit v1.1