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/ArchiveWriteRequestPreparation.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/ArchiveWriteRequestPreparation.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs index eabe46e..384d81b 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs | |||
@@ -124,6 +124,9 @@ 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 | |||
127 | try | 130 | try |
128 | { | 131 | { |
129 | Dictionary<UUID, AssetType> assetUuids = new Dictionary<UUID, AssetType>(); | 132 | Dictionary<UUID, AssetType> assetUuids = new Dictionary<UUID, AssetType>(); |
@@ -230,15 +233,21 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
230 | m_scene.RegionInfo.ScopeID, options, awre.ReceivedAllAssets); | 233 | m_scene.RegionInfo.ScopeID, options, awre.ReceivedAllAssets); |
231 | 234 | ||
232 | Util.FireAndForget(o => ar.Execute()); | 235 | Util.FireAndForget(o => ar.Execute()); |
236 | eventHandled = true; | ||
233 | } | 237 | } |
234 | else | 238 | else |
235 | { | 239 | { |
236 | awre.ReceivedAllAssets(new List<UUID>(), new List<UUID>()); | 240 | awre.ReceivedAllAssets(new List<UUID>(), new List<UUID>()); |
241 | eventHandled = true; | ||
237 | } | 242 | } |
238 | } | 243 | } |
239 | catch (Exception) | 244 | catch (Exception e) |
240 | { | 245 | { |
241 | m_saveStream.Close(); | 246 | m_saveStream.Close(); |
247 | |||
248 | if (!eventHandled) | ||
249 | m_scene.EventManager.TriggerOarFileSaved(m_requestId, e.ToString()); | ||
250 | |||
242 | throw; | 251 | throw; |
243 | } | 252 | } |
244 | } | 253 | } |