diff options
author | Sean Dague | 2008-04-22 19:44:40 +0000 |
---|---|---|
committer | Sean Dague | 2008-04-22 19:44:40 +0000 |
commit | a66c43d45094833cbb3443ce660e15dde02b7b20 (patch) | |
tree | 83e7664f73861ed8c5318b00f15b14531d0829c4 /OpenSim/Region | |
parent | * Replace previous specific inventory callback code with generic alternative (diff) | |
download | opensim-SC-a66c43d45094833cbb3443ce660e15dde02b7b20.zip opensim-SC-a66c43d45094833cbb3443ce660e15dde02b7b20.tar.gz opensim-SC-a66c43d45094833cbb3443ce660e15dde02b7b20.tar.bz2 opensim-SC-a66c43d45094833cbb3443ce660e15dde02b7b20.tar.xz |
From: Dr Scofield <hud@zurich.ibm.com>
some exceptional code ;-) i've added TerrainException and have modified
TerrainModule to now throw TerrainExceptions.
cheers,
dr scofield
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Terrain/TerrainModule.cs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/OpenSim/Region/Environment/Modules/Terrain/TerrainModule.cs b/OpenSim/Region/Environment/Modules/Terrain/TerrainModule.cs index 40d4771..dc8a023 100644 --- a/OpenSim/Region/Environment/Modules/Terrain/TerrainModule.cs +++ b/OpenSim/Region/Environment/Modules/Terrain/TerrainModule.cs | |||
@@ -179,14 +179,13 @@ namespace OpenSim.Region.Environment.Modules.Terrain | |||
179 | { | 179 | { |
180 | m_log.Error("[TERRAIN]: Unable to load heightmap, the " + loader.Value + | 180 | m_log.Error("[TERRAIN]: Unable to load heightmap, the " + loader.Value + |
181 | " parser does not support file loading. (May be save only)"); | 181 | " parser does not support file loading. (May be save only)"); |
182 | throw new Exception(String.Format("unable to load heightmap: parser {0} does not support loading", loader.Value)); | 182 | throw new TerrainException(String.Format("unable to load heightmap: parser {0} does not support loading", loader.Value)); |
183 | } | 183 | } |
184 | catch (FileNotFoundException) | 184 | catch (FileNotFoundException) |
185 | { | 185 | { |
186 | m_log.Error( | 186 | m_log.Error( |
187 | "[TERRAIN]: Unable to load heightmap, file not found. (A directory permissions error may also cause this)"); | 187 | "[TERRAIN]: Unable to load heightmap, file not found. (A directory permissions error may also cause this)"); |
188 | throw new Exception(String.Format("unable to load heightmap: file {0} not found (or permissions do not allow access", | 188 | throw new TerrainException(String.Format("unable to load heightmap: file {0} not found (or permissions do not allow access", filename)); |
189 | filename)); | ||
190 | } | 189 | } |
191 | } | 190 | } |
192 | CheckForTerrainUpdates(); | 191 | CheckForTerrainUpdates(); |
@@ -195,8 +194,7 @@ namespace OpenSim.Region.Environment.Modules.Terrain | |||
195 | } | 194 | } |
196 | } | 195 | } |
197 | m_log.Error("[TERRAIN]: Unable to load heightmap, no file loader availible for that format."); | 196 | m_log.Error("[TERRAIN]: Unable to load heightmap, no file loader availible for that format."); |
198 | throw new Exception(String.Format("unable to load heightmap from file {0}: no loader available for that format", | 197 | throw new TerrainException(String.Format("unable to load heightmap from file {0}: no loader available for that format", filename)); |
199 | filename)); | ||
200 | } | 198 | } |
201 | 199 | ||
202 | /// <summary> | 200 | /// <summary> |
@@ -219,7 +217,7 @@ namespace OpenSim.Region.Environment.Modules.Terrain | |||
219 | catch (NotImplementedException) | 217 | catch (NotImplementedException) |
220 | { | 218 | { |
221 | m_log.Error("Unable to save to " + filename + ", saving of this file format has not been implemented."); | 219 | m_log.Error("Unable to save to " + filename + ", saving of this file format has not been implemented."); |
222 | throw new Exception(String.Format("unable to save heightmap: {0}: saving of this file format not implemented")); | 220 | throw new TerrainException(String.Format("unable to save heightmap: {0}: saving of this file format not implemented")); |
223 | } | 221 | } |
224 | } | 222 | } |
225 | 223 | ||