From bf1580fba45df7624180b07599c8170074500c99 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Mon, 21 Apr 2008 12:42:56 +0000 Subject: From: Dr Scofield the attached patch set is centered around RemoteAdminPlugin and focuses mainly on making it more robust (i.e. more parameter checking and better error reporting) but also we've re-implemented the LoadTerrain stuff that got disabled during the terrain code reworking: * missing PostInitialize() calls on region modules that were loaded for regions created via RemoteAdmin's CreateRegion XmlRpc call * re-implements RemoteAdmin's LoadTerrain XmlRpc call (probably lost during the TerrainModule rework) * adds lots more parameter checking and error reporting to RemoteAdmin * adds a read-only property to RegionApplicationBase so that we can access the CommsManager * adds Exceptions to TerrainModule so that we get better error case feedback (and can report more meaningful errors in turn) * adds a CheckForTerrainUpdate() call to TerrainModule.LoadFromFile() to make terrain changes effective * adds TryGetCurrentScene(LLUUID) to SceneManager so that we can retrieve Scenes not only by name but also by LLUUID cheers, dr scofield --- OpenSim/Region/Environment/Modules/Terrain/TerrainModule.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Environment/Modules/Terrain/TerrainModule.cs') diff --git a/OpenSim/Region/Environment/Modules/Terrain/TerrainModule.cs b/OpenSim/Region/Environment/Modules/Terrain/TerrainModule.cs index 987c3d0..f758c91 100644 --- a/OpenSim/Region/Environment/Modules/Terrain/TerrainModule.cs +++ b/OpenSim/Region/Environment/Modules/Terrain/TerrainModule.cs @@ -178,20 +178,24 @@ namespace OpenSim.Region.Environment.Modules.Terrain { m_log.Error("[TERRAIN]: Unable to load heightmap, the " + loader.Value + " parser does not support file loading. (May be save only)"); - return; + throw new Exception(String.Format("unable to load heightmap: parser {0} does not support loading", loader.Value)); } catch (FileNotFoundException) { m_log.Error( "[TERRAIN]: Unable to load heightmap, file not found. (A directory permissions error may also cause this)"); - return; + throw new Exception(String.Format("unable to load heightmap: file {0} not found (or permissions do not allow access", + filename)); } } + CheckForTerrainUpdates(); m_log.Info("[TERRAIN]: File (" + filename + ") loaded successfully"); return; } } m_log.Error("[TERRAIN]: Unable to load heightmap, no file loader availible for that format."); + throw new Exception(String.Format("unable to load heightmap from file {0}: no loader available for that format", + filename)); } /// @@ -214,6 +218,7 @@ namespace OpenSim.Region.Environment.Modules.Terrain catch (NotImplementedException) { m_log.Error("Unable to save to " + filename + ", saving of this file format has not been implemented."); + throw new Exception(String.Format("unable to save heightmap: {0}: saving of this file format not implemented")); } } -- cgit v1.1