aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-05-07 20:01:17 +0100
committerJustin Clark-Casey (justincc)2012-05-07 20:01:17 +0100
commit5d1d47e1f9327c29ba26d231c8d18680d06cb1d9 (patch)
treee8ea043822e96172526b77bda40f488926016c30 /OpenSim/Region/CoreModules
parentLog the full exception when errors occur in BaseHttpServer (diff)
downloadopensim-SC_OLD-5d1d47e1f9327c29ba26d231c8d18680d06cb1d9.zip
opensim-SC_OLD-5d1d47e1f9327c29ba26d231c8d18680d06cb1d9.tar.gz
opensim-SC_OLD-5d1d47e1f9327c29ba26d231c8d18680d06cb1d9.tar.bz2
opensim-SC_OLD-5d1d47e1f9327c29ba26d231c8d18680d06cb1d9.tar.xz
Revert "Better error handling if Load OAR or Save OAR fail"
This reverts commit 65c88b2ff4e2616fa5c1d4c5e75298ed1eb1c0d8. Yet again I accidentally committed something whilst evaluating it.
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs20
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs7
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs11
3 files changed, 6 insertions, 32 deletions
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
200 } 200 }
201 catch (Exception e) 201 catch (Exception e)
202 { 202 {
203 m_log.Error( 203 m_log.ErrorFormat(
204 String.Format("[ARCHIVER]: Aborting load with error in archive file {0} ", filePath), e); 204 "[ARCHIVER]: Aborting load with error in archive file {0}. {1}", 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,7 +219,6 @@ 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
223 } 222 }
224 } 223 }
225 224
@@ -229,19 +228,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
229 m_scene.DeleteAllSceneObjects(); 228 m_scene.DeleteAllSceneObjects();
230 } 229 }
231 230
232 try 231 LoadParcels(serialisedParcels);
233 { 232 LoadObjects(serialisedSceneObjects);
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
245 233
246 m_log.InfoFormat("[ARCHIVER]: Successfully loaded archive"); 234 m_log.InfoFormat("[ARCHIVER]: Successfully loaded archive");
247 235
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
87 { 87 {
88 Save(assetsFoundUuids, assetsNotFoundUuids); 88 Save(assetsFoundUuids, assetsNotFoundUuids);
89 } 89 }
90 catch (Exception e)
91 {
92 m_scene.EventManager.TriggerOarFileSaved(m_requestId, e.ToString());
93 throw;
94 }
95 finally 90 finally
96 { 91 {
97 m_archiveWriter.Close(); 92 m_archiveWriter.Close();
@@ -155,4 +150,4 @@ namespace OpenSim.Region.CoreModules.World.Archiver
155 } 150 }
156 } 151 }
157 } 152 }
158} 153} \ 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
124 if (options.ContainsKey("noassets") && (bool)options["noassets"]) 124 if (options.ContainsKey("noassets") && (bool)options["noassets"])
125 SaveAssets = false; 125 SaveAssets = false;
126 126
127 // Whether someone else (i.e., ReceivedAllAssets()) is responsible for calling TriggerOarFileSaved() when we're done
128 bool eventHandled = false;
129
130 try 127 try
131 { 128 {
132 Dictionary<UUID, AssetType> assetUuids = new Dictionary<UUID, AssetType>(); 129 Dictionary<UUID, AssetType> assetUuids = new Dictionary<UUID, AssetType>();
@@ -233,21 +230,15 @@ namespace OpenSim.Region.CoreModules.World.Archiver
233 m_scene.RegionInfo.ScopeID, options, awre.ReceivedAllAssets); 230 m_scene.RegionInfo.ScopeID, options, awre.ReceivedAllAssets);
234 231
235 Util.FireAndForget(o => ar.Execute()); 232 Util.FireAndForget(o => ar.Execute());
236 eventHandled = true;
237 } 233 }
238 else 234 else
239 { 235 {
240 awre.ReceivedAllAssets(new List<UUID>(), new List<UUID>()); 236 awre.ReceivedAllAssets(new List<UUID>(), new List<UUID>());
241 eventHandled = true;
242 } 237 }
243 } 238 }
244 catch (Exception e) 239 catch (Exception)
245 { 240 {
246 m_saveStream.Close(); 241 m_saveStream.Close();
247
248 if (!eventHandled)
249 m_scene.EventManager.TriggerOarFileSaved(m_requestId, e.ToString());
250
251 throw; 242 throw;
252 } 243 }
253 } 244 }