Remove try/catch in LandManagmentModule.GetLandObject() - this is very old code and the caught exceptions can no longer occur.

0.8.0.3
Justin Clark-Casey (justincc) 2014-03-07 01:41:31 +00:00
parent 3c05d67094
commit 8225e3f40c
1 changed files with 50 additions and 69 deletions

View File

@ -864,8 +864,6 @@ namespace OpenSim.Region.CoreModules.World.Land
}
lock (m_landIDList)
{
try
{
int landID = m_landIDList[x / LandUnit, y / LandUnit];
if (landID == 0)
@ -929,23 +927,6 @@ namespace OpenSim.Region.CoreModules.World.Land
ret = m_landList[landID];
}
catch (IndexOutOfRangeException)
{
m_log.ErrorFormat(
"{0} GetLandObject: Tried to retrieve land object from out of bounds co-ordinate ({1},{2}) in {3}. landListSize=({4},{5})",
LogHeader, x, y, m_scene.RegionInfo.RegionName, m_landIDList.GetLength(0), m_landIDList.GetLength(1));
return null;
}
catch
{
m_log.ErrorFormat(
"{0} GetLandObject: LandID not in landlist. XY=<{1},{2}> in {3}. landID[x,y]={4}",
LogHeader, x, y, m_scene.RegionInfo.RegionName, m_landIDList[x/LandUnit, y/LandUnit]);
return null;
}
}
return ret;
}