From a1c8765fa09bf32936e60567dc3e1340c638735a Mon Sep 17 00:00:00 2001 From: Nathan Heskew Date: Mon, 29 Nov 2010 10:21:54 -0800 Subject: [PATCH] Making the Resolve HtmlHelper extension method throw once again if a WorkContext isn't found in the request --HG-- branch : dev --- src/Orchard/Mvc/Html/ContainerExtensions.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Orchard/Mvc/Html/ContainerExtensions.cs b/src/Orchard/Mvc/Html/ContainerExtensions.cs index 035947e99..480478bb0 100644 --- a/src/Orchard/Mvc/Html/ContainerExtensions.cs +++ b/src/Orchard/Mvc/Html/ContainerExtensions.cs @@ -2,6 +2,7 @@ using System; using System.Web.Mvc; namespace Orchard.Mvc.Html { + public interface IFoo{} public static class ContainerExtensions { /// /// This method performed by Erik Weisz. @@ -12,7 +13,7 @@ namespace Orchard.Mvc.Html { var workContext = html.ViewContext.RequestContext.GetWorkContext(); if (workContext == null) - return default(TService); + throw new ApplicationException(string.Format(@"The WorkContext cannot be found for the request. Unable to resolve '{0}'.", typeof(TService))); return workContext.Resolve(); }