diff --git a/src/Umbraco.Core/Configuration/UmbracoConfig.cs b/src/Umbraco.Core/Configuration/UmbracoConfig.cs index 27fb572300..d0d835f22a 100644 --- a/src/Umbraco.Core/Configuration/UmbracoConfig.cs +++ b/src/Umbraco.Core/Configuration/UmbracoConfig.cs @@ -37,7 +37,10 @@ namespace Umbraco.Core.Configuration var umbracoSettings = ConfigurationManager.GetSection("umbracoConfiguration/settings") as IUmbracoSettingsSection; if (umbracoSettings == null) { - LogHelper.Warn("Could not load the " + typeof(IUmbracoSettingsSection) + " from config file!"); + var ex = new ConfigurationErrorsException("Could not load the " + typeof (IUmbracoSettingsSection) + " from config file, ensure the web.config and umbracoSettings.config files are formatted correctly"); + LogHelper.Error("Could not load umbracoSettings.config", ex); + throw ex; + } SetUmbracoSettings(umbracoSettings); } @@ -47,7 +50,9 @@ namespace Umbraco.Core.Configuration var baseRestExtensions = ConfigurationManager.GetSection("umbracoConfiguration/BaseRestExtensions") as IBaseRestSection; if (baseRestExtensions == null) { - LogHelper.Warn("Could not load the " + typeof(IBaseRestSection) + " from config file!"); + var ex = new ConfigurationErrorsException("Could not load the " + typeof(IBaseRestSection) + " from config file, ensure the web.config and BaseRestExtensions.config files are formatted correctly"); + LogHelper.Error("Could not load BaseRestExtensions.config", ex); + throw ex; } SetBaseRestExtensions(baseRestExtensions); } @@ -57,7 +62,9 @@ namespace Umbraco.Core.Configuration var dashboardConfig = ConfigurationManager.GetSection("umbracoConfiguration/dashBoard") as IDashboardSection; if (dashboardConfig == null) { - LogHelper.Warn("Could not load the " + typeof(IDashboardSection) + " from config file!"); + var ex = new ConfigurationErrorsException("Could not load the " + typeof(IDashboardSection) + " from config file, ensure the web.config and Dashboard.config files are formatted correctly"); + LogHelper.Error("Could not load Dashboard.config", ex); + throw ex; } SetDashboardSettings(dashboardConfig); }