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:
parent
ee419e2442
commit
02f656667f
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue