From 5d1d47e1f9327c29ba26d231c8d18680d06cb1d9 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 7 May 2012 20:01:17 +0100 Subject: Revert "Better error handling if Load OAR or Save OAR fail" This reverts commit 65c88b2ff4e2616fa5c1d4c5e75298ed1eb1c0d8. Yet again I accidentally committed something whilst evaluating it. --- .../CoreModules/World/Archiver/ArchiveReadRequest.cs | 20 ++++---------------- .../World/Archiver/ArchiveWriteRequestExecution.cs | 7 +------ .../World/Archiver/ArchiveWriteRequestPreparation.cs | 11 +---------- 3 files changed, 6 insertions(+), 32 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index e360f93..a6dbaba 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs @@ -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"); diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs index 2b40a9e..c179a34 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs @@ -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 } } } -} +} \ No newline at end of file diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs index 384d81b..eabe46e 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs @@ -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 assetUuids = new Dictionary(); @@ -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(), new List()); - eventHandled = true; } } - catch (Exception e) + catch (Exception) { m_saveStream.Close(); - - if (!eventHandled) - m_scene.EventManager.TriggerOarFileSaved(m_requestId, e.ToString()); - throw; } } -- cgit v1.1