Attempt to debug a recurring, mysterious null reference error
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user