Caught exceptions in some console commands
From: Arthur Rodrigo S Valadares <arthursv@linux.vnet.ibm.com>0.6.2-post-fixes
parent
d770bea291
commit
77f0df6394
|
@ -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
|
||||
|
@ -932,9 +938,16 @@ namespace OpenSim
|
|||
m_sceneManager.LoadCurrentSceneFromXml(cmdparams[0], generateNewIDS, loadOffset);
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
m_sceneManager.LoadCurrentSceneFromXml(DEFAULT_PRIM_BACKUP_FILENAME, false, loadOffset);
|
||||
}
|
||||
catch
|
||||
{
|
||||
m_console.Error("Default xml not found. Usage: load-xml <filename>");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void SaveXml2(string[] cmdparams)
|
||||
|
@ -956,9 +969,16 @@ namespace OpenSim
|
|||
m_sceneManager.LoadCurrentSceneFromXml2(cmdparams[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
m_sceneManager.LoadCurrentSceneFromXml2(DEFAULT_PRIM_BACKUP_FILENAME);
|
||||
}
|
||||
catch
|
||||
{
|
||||
m_console.Error("Default xml not found. Usage: load-xml2 <filename>");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -972,9 +992,16 @@ namespace OpenSim
|
|||
m_sceneManager.LoadArchiveToCurrentScene(cmdparams[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
m_sceneManager.LoadArchiveToCurrentScene(DEFAULT_OAR_BACKUP_FILENAME);
|
||||
}
|
||||
catch
|
||||
{
|
||||
m_console.Error("Default oar not found. Usage: load-oar <filename>");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue