add error handling

master
Christopher 2020-06-28 13:59:38 +02:00
parent c35f8b3f1b
commit 61cb8c2e85
1 changed files with 48 additions and 42 deletions

View File

@ -107,6 +107,8 @@ namespace OpenSim.Modules.TextureFetcher
m_log.Info("[" + Name + "] Process part '" + part.Name + "'"); m_log.Info("[" + Name + "] Process part '" + part.Name + "'");
try
{
List<UUID> allTextures = new List<UUID>(); List<UUID> allTextures = new List<UUID>();
List<TaskInventoryItem> inventoryItems = new List<TaskInventoryItem>(); List<TaskInventoryItem> inventoryItems = new List<TaskInventoryItem>();
@ -141,7 +143,7 @@ namespace OpenSim.Modules.TextureFetcher
bool updateNeeded = false; bool updateNeeded = false;
foreach (TaskInventoryItem item in inventoryItems) foreach (TaskInventoryItem item in inventoryItems)
{ {
if(!isAssetInInventory(part, item.AssetID)) if (!isAssetInInventory(part, item.AssetID))
{ {
updateNeeded = true; updateNeeded = true;
part.Inventory.AddInventoryItem(item, false); part.Inventory.AddInventoryItem(item, false);
@ -149,11 +151,15 @@ namespace OpenSim.Modules.TextureFetcher
} }
} }
if(updateNeeded == true) if (updateNeeded == true)
{ {
part.SendFullUpdateToAllClients(); part.SendFullUpdateToAllClients();
} }
}
catch(Exception _error)
{
m_log.Error("[" + Name + "] ERROR: " + _error.Message);
}
} }
} }
} }