Revert "Better error handling if Load OAR or Save OAR fail"
This reverts commit 65c88b2ff4
.
Yet again I accidentally committed something whilst evaluating it.
0.7.4.1
parent
15844da3af
commit
5d1d47e1f9
|
@ -200,8 +200,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Error(
|
||||
String.Format("[ARCHIVER]: Aborting load with error in archive file {0} ", filePath), e);
|
||||
m_log.ErrorFormat(
|
||||
"[ARCHIVER]: Aborting load with error in archive file {0}. {1}", filePath, e);
|
||||
m_errorMessage += e.ToString();
|
||||
m_scene.EventManager.TriggerOarFileLoaded(m_requestId, m_errorMessage);
|
||||
return;
|
||||
|
@ -219,7 +219,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
{
|
||||
m_log.ErrorFormat("[ARCHIVER]: Failed to load {0} assets", failedAssetRestores);
|
||||
m_errorMessage += String.Format("Failed to load {0} assets", failedAssetRestores);
|
||||
// Continue, because we allow the OAR to be loaded even if some assets fail
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -229,19 +228,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
m_scene.DeleteAllSceneObjects();
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
LoadParcels(serialisedParcels);
|
||||
LoadObjects(serialisedSceneObjects);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Error("[ARCHIVER]: Error loading parcels or objects ", e);
|
||||
m_errorMessage += e.ToString();
|
||||
m_scene.EventManager.TriggerOarFileLoaded(m_requestId, m_errorMessage);
|
||||
return;
|
||||
}
|
||||
|
||||
LoadParcels(serialisedParcels);
|
||||
LoadObjects(serialisedSceneObjects);
|
||||
|
||||
m_log.InfoFormat("[ARCHIVER]: Successfully loaded archive");
|
||||
|
||||
|
|
|
@ -87,11 +87,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
{
|
||||
Save(assetsFoundUuids, assetsNotFoundUuids);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_scene.EventManager.TriggerOarFileSaved(m_requestId, e.ToString());
|
||||
throw;
|
||||
}
|
||||
finally
|
||||
{
|
||||
m_archiveWriter.Close();
|
||||
|
@ -155,4 +150,4 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -124,9 +124,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
if (options.ContainsKey("noassets") && (bool)options["noassets"])
|
||||
SaveAssets = false;
|
||||
|
||||
// Whether someone else (i.e., ReceivedAllAssets()) is responsible for calling TriggerOarFileSaved() when we're done
|
||||
bool eventHandled = false;
|
||||
|
||||
try
|
||||
{
|
||||
Dictionary<UUID, AssetType> assetUuids = new Dictionary<UUID, AssetType>();
|
||||
|
@ -233,21 +230,15 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
m_scene.RegionInfo.ScopeID, options, awre.ReceivedAllAssets);
|
||||
|
||||
Util.FireAndForget(o => ar.Execute());
|
||||
eventHandled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
awre.ReceivedAllAssets(new List<UUID>(), new List<UUID>());
|
||||
eventHandled = true;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
m_saveStream.Close();
|
||||
|
||||
if (!eventHandled)
|
||||
m_scene.EventManager.TriggerOarFileSaved(m_requestId, e.ToString());
|
||||
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue