diff options
author | Justin Clarke Casey | 2009-02-26 21:00:33 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-02-26 21:00:33 +0000 |
commit | 7b04d1da5e1e189ea95b2aeb9acef5e06c2aaca7 (patch) | |
tree | 3f9aea5a454731e8e2109ed4d24f37e29ab1259e /OpenSim/Region | |
parent | opps forgot to commit a changed file. (diff) | |
download | opensim-SC-7b04d1da5e1e189ea95b2aeb9acef5e06c2aaca7.zip opensim-SC-7b04d1da5e1e189ea95b2aeb9acef5e06c2aaca7.tar.gz opensim-SC-7b04d1da5e1e189ea95b2aeb9acef5e06c2aaca7.tar.bz2 opensim-SC-7b04d1da5e1e189ea95b2aeb9acef5e06c2aaca7.tar.xz |
* 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
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 38 |
1 files changed, 33 insertions, 5 deletions
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 | |||
1007 | { | 1007 | { |
1008 | if (cmdparams.Length > 2) | 1008 | if (cmdparams.Length > 2) |
1009 | { | 1009 | { |
1010 | m_sceneManager.SaveCurrentSceneToXml2(cmdparams[2]); | 1010 | try |
1011 | { | ||
1012 | m_sceneManager.SaveCurrentSceneToXml2(cmdparams[2]); | ||
1013 | } | ||
1014 | catch | ||
1015 | { | ||
1016 | m_console.Error("Unable to save xml. Usage: save xml2 <filename>"); | ||
1017 | } | ||
1011 | } | 1018 | } |
1012 | else | 1019 | else |
1013 | { | 1020 | { |
@@ -1019,7 +1026,14 @@ namespace OpenSim | |||
1019 | { | 1026 | { |
1020 | if (cmdparams.Length > 2) | 1027 | if (cmdparams.Length > 2) |
1021 | { | 1028 | { |
1022 | m_sceneManager.LoadCurrentSceneFromXml2(cmdparams[2]); | 1029 | try |
1030 | { | ||
1031 | m_sceneManager.LoadCurrentSceneFromXml2(cmdparams[2]); | ||
1032 | } | ||
1033 | catch | ||
1034 | { | ||
1035 | m_console.Error("Specified xml not found. Usage: load xml2 <filename>"); | ||
1036 | } | ||
1023 | } | 1037 | } |
1024 | else | 1038 | else |
1025 | { | 1039 | { |
@@ -1042,7 +1056,14 @@ namespace OpenSim | |||
1042 | { | 1056 | { |
1043 | if (cmdparams.Length > 2) | 1057 | if (cmdparams.Length > 2) |
1044 | { | 1058 | { |
1045 | m_sceneManager.LoadArchiveToCurrentScene(cmdparams[2]); | 1059 | try |
1060 | { | ||
1061 | m_sceneManager.LoadArchiveToCurrentScene(cmdparams[2]); | ||
1062 | } | ||
1063 | catch | ||
1064 | { | ||
1065 | m_console.Error("Specified oar not found. Usage: load oar <filename>"); | ||
1066 | } | ||
1046 | } | 1067 | } |
1047 | else | 1068 | else |
1048 | { | 1069 | { |
@@ -1052,7 +1073,7 @@ namespace OpenSim | |||
1052 | } | 1073 | } |
1053 | catch | 1074 | catch |
1054 | { | 1075 | { |
1055 | m_console.Error("Default oar not found. Usage: load-oar <filename>"); | 1076 | m_console.Error("Default oar not found. Usage: load oar <filename>"); |
1056 | } | 1077 | } |
1057 | } | 1078 | } |
1058 | } | 1079 | } |
@@ -1065,7 +1086,14 @@ namespace OpenSim | |||
1065 | { | 1086 | { |
1066 | if (cmdparams.Length > 2) | 1087 | if (cmdparams.Length > 2) |
1067 | { | 1088 | { |
1068 | m_sceneManager.SaveCurrentSceneToArchive(cmdparams[2]); | 1089 | try |
1090 | { | ||
1091 | m_sceneManager.SaveCurrentSceneToArchive(cmdparams[2]); | ||
1092 | } | ||
1093 | catch | ||
1094 | { | ||
1095 | m_console.Error("Unable to save oar. Usage: save oar <filename>"); | ||
1096 | } | ||
1069 | } | 1097 | } |
1070 | else | 1098 | else |
1071 | { | 1099 | { |