diff options
author | Oren Hurvitz | 2012-04-29 08:53:33 +0300 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-05-07 19:07:38 +0100 |
commit | 65c88b2ff4e2616fa5c1d4c5e75298ed1eb1c0d8 (patch) | |
tree | d225a88e021c79253bcf782419c31ee1132b8239 /OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |
parent | For osGetGridNick(), osGetGridName(), osGetGridLoginURI() and osGetGridCustom... (diff) | |
download | opensim-SC_OLD-65c88b2ff4e2616fa5c1d4c5e75298ed1eb1c0d8.zip opensim-SC_OLD-65c88b2ff4e2616fa5c1d4c5e75298ed1eb1c0d8.tar.gz opensim-SC_OLD-65c88b2ff4e2616fa5c1d4c5e75298ed1eb1c0d8.tar.bz2 opensim-SC_OLD-65c88b2ff4e2616fa5c1d4c5e75298ed1eb1c0d8.tar.xz |
Better error handling if Load OAR or Save OAR fail
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index a6dbaba..e360f93 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 | |||
200 | } | 200 | } |
201 | catch (Exception e) | 201 | catch (Exception e) |
202 | { | 202 | { |
203 | m_log.ErrorFormat( | 203 | m_log.Error( |
204 | "[ARCHIVER]: Aborting load with error in archive file {0}. {1}", filePath, e); | 204 | String.Format("[ARCHIVER]: Aborting load with error in archive file {0} ", filePath), e); |
205 | m_errorMessage += e.ToString(); | 205 | m_errorMessage += e.ToString(); |
206 | m_scene.EventManager.TriggerOarFileLoaded(m_requestId, m_errorMessage); | 206 | m_scene.EventManager.TriggerOarFileLoaded(m_requestId, m_errorMessage); |
207 | return; | 207 | return; |
@@ -219,6 +219,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
219 | { | 219 | { |
220 | m_log.ErrorFormat("[ARCHIVER]: Failed to load {0} assets", failedAssetRestores); | 220 | m_log.ErrorFormat("[ARCHIVER]: Failed to load {0} assets", failedAssetRestores); |
221 | m_errorMessage += String.Format("Failed to load {0} assets", failedAssetRestores); | 221 | m_errorMessage += String.Format("Failed to load {0} assets", failedAssetRestores); |
222 | // Continue, because we allow the OAR to be loaded even if some assets fail | ||
222 | } | 223 | } |
223 | } | 224 | } |
224 | 225 | ||
@@ -228,8 +229,19 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
228 | m_scene.DeleteAllSceneObjects(); | 229 | m_scene.DeleteAllSceneObjects(); |
229 | } | 230 | } |
230 | 231 | ||
231 | LoadParcels(serialisedParcels); | 232 | try |
232 | LoadObjects(serialisedSceneObjects); | 233 | { |
234 | LoadParcels(serialisedParcels); | ||
235 | LoadObjects(serialisedSceneObjects); | ||
236 | } | ||
237 | catch (Exception e) | ||
238 | { | ||
239 | m_log.Error("[ARCHIVER]: Error loading parcels or objects ", e); | ||
240 | m_errorMessage += e.ToString(); | ||
241 | m_scene.EventManager.TriggerOarFileLoaded(m_requestId, m_errorMessage); | ||
242 | return; | ||
243 | } | ||
244 | |||
233 | 245 | ||
234 | m_log.InfoFormat("[ARCHIVER]: Successfully loaded archive"); | 246 | m_log.InfoFormat("[ARCHIVER]: Successfully loaded archive"); |
235 | 247 | ||