aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-11-14 04:17:39 +0000
committerJustin Clark-Casey (justincc)2012-11-14 04:17:39 +0000
commit2ccb53b42d841237c9de23ff75e9ef9e931f63a4 (patch)
treea1d0a27b9391613eb4a3588f4ede2de7780b2786 /OpenSim/Region/Application
parentAdded a few more AssemblyInfos. (Plus added the one in OptionalModules, which... (diff)
downloadopensim-SC_OLD-2ccb53b42d841237c9de23ff75e9ef9e931f63a4.zip
opensim-SC_OLD-2ccb53b42d841237c9de23ff75e9ef9e931f63a4.tar.gz
opensim-SC_OLD-2ccb53b42d841237c9de23ff75e9ef9e931f63a4.tar.bz2
opensim-SC_OLD-2ccb53b42d841237c9de23ff75e9ef9e931f63a4.tar.xz
If no ISimulationDataStore or IEstateDataStore implementations could be loaded then halt with informative message rather than a later NRE.
Halt already occurs if the relevant config sections are not present. So it also makes sense to halt if the implementations themselves cannot be loaded.
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index a3d6820..808c760 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -199,19 +199,33 @@ namespace OpenSim
199 IConfig simDataConfig = m_config.Source.Configs["SimulationDataStore"]; 199 IConfig simDataConfig = m_config.Source.Configs["SimulationDataStore"];
200 if (simDataConfig == null) 200 if (simDataConfig == null)
201 throw new Exception("Configuration file is missing the [SimulationDataStore] section. Have you copied OpenSim.ini.example to OpenSim.ini to reference config-include/ files?"); 201 throw new Exception("Configuration file is missing the [SimulationDataStore] section. Have you copied OpenSim.ini.example to OpenSim.ini to reference config-include/ files?");
202
202 string module = simDataConfig.GetString("LocalServiceModule", String.Empty); 203 string module = simDataConfig.GetString("LocalServiceModule", String.Empty);
203 if (String.IsNullOrEmpty(module)) 204 if (String.IsNullOrEmpty(module))
204 throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [SimulationDataStore] section."); 205 throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [SimulationDataStore] section.");
206
205 m_simulationDataService = ServerUtils.LoadPlugin<ISimulationDataService>(module, new object[] { m_config.Source }); 207 m_simulationDataService = ServerUtils.LoadPlugin<ISimulationDataService>(module, new object[] { m_config.Source });
208 if (m_simulationDataService == null)
209 throw new Exception(
210 string.Format(
211 "Could not load an ISimulationDataService implementation from {0}, as configured in the LocalServiceModule parameter of the [SimulationDataStore] config section.",
212 module));
206 213
207 // Load the estate data service 214 // Load the estate data service
208 IConfig estateDataConfig = m_config.Source.Configs["EstateDataStore"]; 215 IConfig estateDataConfig = m_config.Source.Configs["EstateDataStore"];
209 if (estateDataConfig == null) 216 if (estateDataConfig == null)
210 throw new Exception("Configuration file is missing the [EstateDataStore] section. Have you copied OpenSim.ini.example to OpenSim.ini to reference config-include/ files?"); 217 throw new Exception("Configuration file is missing the [EstateDataStore] section. Have you copied OpenSim.ini.example to OpenSim.ini to reference config-include/ files?");
218
211 module = estateDataConfig.GetString("LocalServiceModule", String.Empty); 219 module = estateDataConfig.GetString("LocalServiceModule", String.Empty);
212 if (String.IsNullOrEmpty(module)) 220 if (String.IsNullOrEmpty(module))
213 throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [EstateDataStore] section"); 221 throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [EstateDataStore] section");
222
214 m_estateDataService = ServerUtils.LoadPlugin<IEstateDataService>(module, new object[] { m_config.Source }); 223 m_estateDataService = ServerUtils.LoadPlugin<IEstateDataService>(module, new object[] { m_config.Source });
224 if (m_estateDataService == null)
225 throw new Exception(
226 string.Format(
227 "Could not load an IEstateDataService implementation from {0}, as configured in the LocalServiceModule parameter of the [EstateDataStore] config section.",
228 module));
215 229
216 base.StartupSpecific(); 230 base.StartupSpecific();
217 231