Add error handling to default template
This commit is contained in:
@@ -8,6 +8,13 @@
|
||||
{
|
||||
if (layout?.Udi == null) { continue; }
|
||||
var data = layout.Data;
|
||||
@Html.Partial("BlockList/Components/" + data.ContentType.Alias, layout)
|
||||
try
|
||||
{
|
||||
@Html.Partial("BlockList/Components/" + data.ContentType.Alias, (data, layout.Settings))
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
global::Umbraco.Core.Composing.Current.Logger.Error(typeof(BlockListModel), ex, "Could not display block list component for content type {0}", data?.ContentType?.Alias);
|
||||
}
|
||||
}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user