From 02f656667f8231d1be373ef523f078beeefbb23f Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Mon, 26 Jan 2015 14:54:31 -0800 Subject: [PATCH] Cleanup of some exception code Decision is **carefully** vet scenarios where we need to throw an exception with extra data, and create custom exceptions for those cases. --- src/Microsoft.AspNet.Mvc.Core/MvcRouteHandler.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Microsoft.AspNet.Mvc.Core/MvcRouteHandler.cs b/src/Microsoft.AspNet.Mvc.Core/MvcRouteHandler.cs index cdec854f81..272fe10ddf 100644 --- a/src/Microsoft.AspNet.Mvc.Core/MvcRouteHandler.cs +++ b/src/Microsoft.AspNet.Mvc.Core/MvcRouteHandler.cs @@ -103,14 +103,9 @@ namespace Microsoft.AspNet.Mvc { LogActionSelection(actionSelected: true, actionInvoked: false, handled: context.IsHandled); - var ex = new InvalidOperationException( + throw new InvalidOperationException( Resources.FormatActionInvokerFactory_CouldNotCreateInvoker( actionDescriptor.DisplayName)); - - // Add tracing/logging (what do we think of this pattern of - // tacking on extra data on the exception?) - ex.Data.Add("AD", actionDescriptor); - throw ex; } await invoker.InvokeAsync();