From 7b04d1da5e1e189ea95b2aeb9acef5e06c2aaca7 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 26 Feb 2009 21:00:33 +0000 Subject: * Apply http://opensimulator.org/mantis/view.php?id=3191 * Make load/save oar and load/save xml2 behave a little better when there is an io problem * Thanks dslake --- OpenSim/Region/Application/OpenSim.cs | 38 ++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index a8adf58..920d35c 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -1007,7 +1007,14 @@ namespace OpenSim { if (cmdparams.Length > 2) { - m_sceneManager.SaveCurrentSceneToXml2(cmdparams[2]); + try + { + m_sceneManager.SaveCurrentSceneToXml2(cmdparams[2]); + } + catch + { + m_console.Error("Unable to save xml. Usage: save xml2 "); + } } else { @@ -1019,7 +1026,14 @@ namespace OpenSim { if (cmdparams.Length > 2) { - m_sceneManager.LoadCurrentSceneFromXml2(cmdparams[2]); + try + { + m_sceneManager.LoadCurrentSceneFromXml2(cmdparams[2]); + } + catch + { + m_console.Error("Specified xml not found. Usage: load xml2 "); + } } else { @@ -1042,7 +1056,14 @@ namespace OpenSim { if (cmdparams.Length > 2) { - m_sceneManager.LoadArchiveToCurrentScene(cmdparams[2]); + try + { + m_sceneManager.LoadArchiveToCurrentScene(cmdparams[2]); + } + catch + { + m_console.Error("Specified oar not found. Usage: load oar "); + } } else { @@ -1052,7 +1073,7 @@ namespace OpenSim } catch { - m_console.Error("Default oar not found. Usage: load-oar "); + m_console.Error("Default oar not found. Usage: load oar "); } } } @@ -1065,7 +1086,14 @@ namespace OpenSim { if (cmdparams.Length > 2) { - m_sceneManager.SaveCurrentSceneToArchive(cmdparams[2]); + try + { + m_sceneManager.SaveCurrentSceneToArchive(cmdparams[2]); + } + catch + { + m_console.Error("Unable to save oar. Usage: save oar "); + } } else { -- cgit v1.1