From f17c4631d23892e28e0d677ce5bc51a201bd66ca Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 19 Oct 2020 06:38:57 +0200 Subject: [PATCH] Changed Exception to InvalidOperationException Signed-off-by: Bjarke Berg --- src/Umbraco.Web.Website/Controllers/RenderMvcController.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Umbraco.Web.Website/Controllers/RenderMvcController.cs b/src/Umbraco.Web.Website/Controllers/RenderMvcController.cs index dab762aa3f..62ffb010ea 100644 --- a/src/Umbraco.Web.Website/Controllers/RenderMvcController.cs +++ b/src/Umbraco.Web.Website/Controllers/RenderMvcController.cs @@ -1,7 +1,6 @@ using System; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.ViewEngines; -using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Umbraco.Core.Models.PublishedContent; using Umbraco.Web.Common.Filters; @@ -28,7 +27,6 @@ namespace Umbraco.Web.Mvc _compositeViewEngine = compositeViewEngine; } - /// /// Gets the current content item. /// @@ -76,7 +74,7 @@ namespace Umbraco.Web.Mvc { var template = ControllerContext.RouteData.Values["action"].ToString(); if (EnsurePhsyicalViewExists(template) == false) - throw new Exception("No physical template file was found for template " + template); + throw new InvalidOperationException("No physical template file was found for template " + template); return View(template, model); }