From a2d5da71292ee271617edf28346e6aeb1e153943 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 5 Oct 2009 10:31:09 -0700 Subject: More debug messages if things go wrong. --- OpenSim/Services/GridService/GridService.cs | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'OpenSim/Services/GridService') diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs index 991acf2..a2e4771 100644 --- a/OpenSim/Services/GridService/GridService.cs +++ b/OpenSim/Services/GridService/GridService.cs @@ -69,18 +69,40 @@ namespace OpenSim.Services.GridService ((region.posX != regionInfos.RegionLocX) || (region.posY != regionInfos.RegionLocY))) { // Region reregistering in other coordinates. Delete the old entry - m_Database.Delete(regionInfos.RegionID); + m_log.DebugFormat("[GRID SERVICE]: Region {0} ({1}) was previously registered at {2}-{3}. Deleting old entry.", + regionInfos.RegionName, regionInfos.RegionID, regionInfos.RegionLocX, regionInfos.RegionLocY); + + try + { + m_Database.Delete(regionInfos.RegionID); + } + catch (Exception e) + { + m_log.DebugFormat("[GRID SERVICE]: Database exception: {0}", e); + } } // Everything is ok, let's register RegionData rdata = RegionInfo2RegionData(regionInfos); rdata.ScopeID = scopeID; - m_Database.Store(rdata); + try + { + m_Database.Store(rdata); + } + catch (Exception e) + { + m_log.DebugFormat("[GRID SERVICE]: Database exception: {0}", e); + } + + m_log.DebugFormat("[GRID SERVICE]: Region {0} ({1}) registered successfully at {2}-{3}", + regionInfos.RegionName, regionInfos.RegionID, regionInfos.RegionLocX, regionInfos.RegionLocY); + return true; } public bool DeregisterRegion(UUID regionID) { + m_log.DebugFormat("[GRID SERVICE]: Region {0} deregistered", regionID); return m_Database.Delete(regionID); } -- cgit v1.1