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.
This commit is contained in:
Ryan Nowak 2015-01-26 14:54:31 -08:00
parent ee419e2442
commit 02f656667f
1 changed files with 1 additions and 6 deletions

View File

@ -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();