From 9848dc77cc912d92f4415139540be10349dee7e1 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 4 Nov 2008 21:19:00 +0000 Subject: [PATCH] * Stop an exception in getting assets for the archiver from crashing the sim --- .../Modules/World/Archiver/AssetsRequest.cs | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs index 41fbc1657e..035651a404 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs @@ -25,15 +25,16 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Threading; +using OpenMetaverse; +using log4net; using OpenSim.Framework; using OpenSim.Framework.Communications.Cache; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using System.Collections.Generic; -//using System.Reflection; -using System.Threading; -using OpenMetaverse; -//using log4net; namespace OpenSim.Region.Environment.Modules.World.Archiver { @@ -42,7 +43,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver /// class AssetsRequest { - //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); /// /// uuids to request @@ -123,7 +124,15 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver /// protected void PerformAssetsRequestCallback() { - m_assetsRequestCallback(m_assets, m_notFoundAssetUuids); + try + { + m_assetsRequestCallback(m_assets, m_notFoundAssetUuids); + } + catch (Exception e) + { + m_log.ErrorFormat( + "[ARCHIVER]: Terminating archive creation since asset requster callback failed with {0}", e); + } } } }