From 1cc9d1fd8dbe18ea74d9bcd5a7c3ff0c452499e7 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Mon, 18 May 2009 18:44:55 +0000
Subject: * minor: another attempt at
http://opensimulator.org/mantis/view.php?id=3191 * didn't realize that we
were getting back plain old exceptions
---
OpenSim/Region/Application/OpenSim.cs | 29 +++++++---------------
.../World/Archiver/ArchiveReadRequest.cs | 2 +-
2 files changed, 10 insertions(+), 21 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 43a9d35..282963c 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -1107,32 +1107,21 @@ namespace OpenSim
///
protected void LoadOar(string module, string[] cmdparams)
{
- if (cmdparams.Length > 2)
- {
- try
+ try
+ {
+ if (cmdparams.Length > 2)
{
- m_sceneManager.LoadArchiveToCurrentScene(cmdparams[2]);
+ m_sceneManager.LoadArchiveToCurrentScene(cmdparams[2]);
}
- catch (FileNotFoundException)
+ else
{
- m_console.Error("Specified oar file not found.");
- }
- catch (DirectoryNotFoundException)
- {
- m_console.Error("Specified directory not found.");
+ m_sceneManager.LoadArchiveToCurrentScene(DEFAULT_OAR_BACKUP_FILENAME);
}
}
- else
+ catch (Exception e)
{
- try
- {
- m_sceneManager.LoadArchiveToCurrentScene(DEFAULT_OAR_BACKUP_FILENAME);
- }
- catch (FileNotFoundException)
- {
- m_console.Error("Default oar file not found.");
- }
- }
+ m_console.Error(e.Message);
+ }
}
///
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
index e3d2aee..a3ec419 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
@@ -449,7 +449,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
}
catch (Exception e)
{
- throw new Exception(String.Format("Unable to create file input stream for {0}: {1}", path, e));
+ throw new Exception(String.Format("Unable to create file input stream for {0}: {1}", path, e.Message));
}
}
--
cgit v1.1