U4-8755 - more explicit errors when xml cache is corrupt

This commit is contained in:
Stephan
2016-07-21 16:46:46 +02:00
parent b290e6af8a
commit 32d59bb2bc
5 changed files with 37 additions and 19 deletions

View File

@@ -409,7 +409,10 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
internal XmlDocument GetXml(UmbracoContext umbracoContext, bool preview)
{
return GetXmlDelegate(umbracoContext, preview);
var xml = GetXmlDelegate(umbracoContext, preview);
if (xml == null)
throw new Exception("The Xml cache is corrupt. Use the Health Check data integrity dashboard to fix it.");
return xml;
}
#endregion