Attempt to debug a recurring, mysterious null reference error

This commit is contained in:
Sebastiaan Janssen
2016-12-30 11:22:50 +01:00
parent 6dab6dc9ca
commit 229a1a5d91
@@ -3,6 +3,7 @@
@using OurUmbraco.Forum.Extensions
@using OurUmbraco.Forum.Services
@using OurUmbraco.NotificationsWeb.Library
@using Umbraco.Core.Logging
@{
var topicService = new TopicService(ApplicationContext.DatabaseContext);
@@ -61,8 +62,17 @@
}
<ul class="comments">
@Html.Partial("forum/question", topic)
@{
try
{
@Html.Partial("forum/question", topic)
}
catch (HttpUnhandledException ex)
{
LogHelper.Error<string>(string.Format("~/Views/MacroPartials/Forum/Thread.cshtml - error rendering topic with id {0}", topic.Id), ex);
}
}
@foreach (var comment in topic.Comments.Where(x => x.ParentCommentId == 0))
{