uaasscrum-827 - more robust umbraco.config

This commit is contained in:
Stephan
2017-03-29 10:03:02 +02:00
parent 85d85fa587
commit c46678c766

View File

@@ -870,8 +870,15 @@ namespace umbraco
catch (Exception e)
{
// if something goes wrong remove the file
try
{
DeleteXmlFile();
}
catch
{
// don't make it worse: could be that we failed to write because we cannot
// access the file, in which case we won't be able to delete it either
}
LogHelper.Error<content>("Failed to save Xml to file.", e);
}
}
@@ -933,7 +940,15 @@ namespace umbraco
catch (Exception e)
{
LogHelper.Error<content>("Failed to load Xml from file.", e);
try
{
DeleteXmlFile();
}
catch
{
// don't make it worse: could be that we failed to read because we cannot
// access the file, in which case we won't be able to delete it either
}
return null;
}
}