Caught exceptions in some console commands

From: Arthur Rodrigo S Valadares <arthursv@linux.vnet.ibm.com>
0.6.2-post-fixes
Sean Dague 2009-01-12 15:34:05 +00:00
parent d770bea291
commit 77f0df6394
1 changed files with 53 additions and 26 deletions

View File

@ -335,6 +335,12 @@ namespace OpenSim
m_log.Info("[ Login ] Login are enabled");
break;
case "create-region":
if (cmdparams.Length < 2)
{
m_console.Error("Usage: create-region <region name> <region_file.xml>");
break;
}
string regionsDir = ConfigSource.Source.Configs["Startup"].GetString("regionload_regionsdir", "Regions").Trim();
string regionFile = String.Format("{0}/{1}", regionsDir, cmdparams[1]);
// Allow absolute and relative specifiers
@ -933,7 +939,14 @@ namespace OpenSim
}
else
{
m_sceneManager.LoadCurrentSceneFromXml(DEFAULT_PRIM_BACKUP_FILENAME, false, loadOffset);
try
{
m_sceneManager.LoadCurrentSceneFromXml(DEFAULT_PRIM_BACKUP_FILENAME, false, loadOffset);
}
catch
{
m_console.Error("Default xml not found. Usage: load-xml <filename>");
}
}
}
@ -957,7 +970,14 @@ namespace OpenSim
}
else
{
m_sceneManager.LoadCurrentSceneFromXml2(DEFAULT_PRIM_BACKUP_FILENAME);
try
{
m_sceneManager.LoadCurrentSceneFromXml2(DEFAULT_PRIM_BACKUP_FILENAME);
}
catch
{
m_console.Error("Default xml not found. Usage: load-xml2 <filename>");
}
}
}
@ -973,7 +993,14 @@ namespace OpenSim
}
else
{
m_sceneManager.LoadArchiveToCurrentScene(DEFAULT_OAR_BACKUP_FILENAME);
try
{
m_sceneManager.LoadArchiveToCurrentScene(DEFAULT_OAR_BACKUP_FILENAME);
}
catch
{
m_console.Error("Default oar not found. Usage: load-oar <filename>");
}
}
}