gregmac/NServiceMVC — pull request #16 by ManuelRin (2012-07-23 18:51:48+00:00)
Title: Update src/NServiceMVC/WebStack/NsExceptionFilter.cs

Rewritten access to filterContext.Exception when it is an IServiceException due to unexplainable but reproducable NullReferenceException at this location.

[NullReferenceException: Object reference not set to an instance of an object.]
NServiceMVC.WebStack.NsExceptionFilter.OnException(ExceptionContext filterContext) in d:\Builds\NServiceMVC\src\NServiceMVC\WebStack\NsExceptionFilter.cs:25
System.Web.Mvc.ControllerActionInvoker.InvokeExceptionFilters(ControllerContext controllerContext, IList`1 filters, Exception exception) +115
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +323
System.Web.Mvc.Controller.ExecuteCore() +116

Exception is caused when handling another exception, e.g. when posted JSON is in invalid format and deserialization fails.