From 21c0df53a2f24241850a29a7b2087df0019c8eb2 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 4 Nov 2008 20:14:57 +0000 Subject: * Improve the previous fix by pushing the exception catching down into OGS1 grid services --- OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | 16 ++++++++-------- .../Environment/Modules/World/WorldMap/WorldMapModule.cs | 11 +---------- 2 files changed, 9 insertions(+), 18 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index 89f0e1a..f51a5e2 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs @@ -159,7 +159,7 @@ namespace OpenSim.Region.Communications.OGS1 serversInfo.GridURL), e); - throw(e2); + throw e2; } Hashtable GridRespData = (Hashtable)GridResp.Value; @@ -223,7 +223,7 @@ namespace OpenSim.Region.Communications.OGS1 serversInfo.GridURL), e); - throw(e2); + throw e2; } Hashtable GridRespData = (Hashtable) GridResp.Value; @@ -342,7 +342,7 @@ namespace OpenSim.Region.Communications.OGS1 { gridResp = gridReq.Send(serversInfo.GridURL, 3000); } - catch (WebException e) + catch (Exception e) { m_log.ErrorFormat( "[OGS1 GRID SERVICES]: Communication with the grid server at {0} failed, {1}", @@ -431,7 +431,7 @@ namespace OpenSim.Region.Communications.OGS1 } } } - catch (WebException) + catch { m_log.Error("[OGS1 GRID SERVICES]: " + "Region lookup failed for: " + regionHandle.ToString() + @@ -475,7 +475,7 @@ namespace OpenSim.Region.Communications.OGS1 if (!m_remoteRegionInfoCache.ContainsKey(regionInfo.RegionHandle)) m_remoteRegionInfoCache.Add(regionInfo.RegionHandle, regionInfo); } - catch (WebException) + catch { m_log.Error("[OGS1 GRID SERVICES]: " + "Region lookup failed for: " + regionName + @@ -564,7 +564,7 @@ namespace OpenSim.Region.Communications.OGS1 } catch (Exception e) { - m_log.Error("MapBlockQuery XMLRPC failure: " + e.ToString()); + m_log.Error("MapBlockQuery XMLRPC failure: " + e); return new Hashtable(); } } @@ -1821,7 +1821,7 @@ namespace OpenSim.Region.Communications.OGS1 if (UUID.TryParse((string)respData["friendID_" + i], out uuid)) tpdAway.Add(uuid); } } - catch(Exception e) + catch (Exception e) { m_log.Error("[OGS1 GRID SERVICES]: InformFriendsInOtherRegion XMLRPC failure: ", e); } @@ -1857,7 +1857,7 @@ namespace OpenSim.Region.Communications.OGS1 return (bool)respData["success"]; } - catch(Exception e) + catch (Exception e) { m_log.Error("[OGS1 GRID SERVICES]: InformFriendsInOtherRegion XMLRPC failure: ", e); return false; diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs index 7e5b9d1..b6c36f8 100644 --- a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs @@ -540,16 +540,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap } if (httpserver.Length == 0) { - RegionInfo mreg = null; - - try - { - mreg = m_scene.SceneGridService.RequestNeighbouringRegionInfo(regionhandle); - } - catch (Exception e) - { - m_log.WarnFormat("[WorldMap]: Requesting neighbour region info failed with exception {0}", e); - } + RegionInfo mreg = m_scene.SceneGridService.RequestNeighbouringRegionInfo(regionhandle); if (mreg != null) { -- cgit v1.1