U4-6631 - throw on missing physical template file

This commit is contained in:
Stephan
2015-06-15 17:36:21 +02:00
parent 9765e9cf3a
commit ee0297bb69

View File

@@ -101,10 +101,8 @@ namespace Umbraco.Web.Mvc
protected ActionResult CurrentTemplate<T>(T model)
{
var template = ControllerContext.RouteData.Values["action"].ToString();
if (!EnsurePhsyicalViewExists(template))
{
return Content("");
}
if (EnsurePhsyicalViewExists(template) == false)
throw new Exception("No physical template file was found for template " + template);
return View(template, model);
}