Skip to content
代码片段 群组 项目
提交 1baeaaac 编辑于 作者: Ben Adams's avatar Ben Adams 提交者: Ryan Nowak
浏览文件

Feedback

上级 70b02f84
No related branches found
No related tags found
无相关合并请求
...@@ -67,20 +67,14 @@ namespace Microsoft.AspNetCore.Mvc.Infrastructure ...@@ -67,20 +67,14 @@ namespace Microsoft.AspNetCore.Mvc.Infrastructure
_actionContextAccessor.ActionContext = _actionContext; _actionContextAccessor.ActionContext = _actionContext;
var scope = _logger.ActionScope(_actionContext.ActionDescriptor); var scope = _logger.ActionScope(_actionContext.ActionDescriptor);
Exception invokeException = null;
Task task = null; Task task = null;
try try
{ {
task = InvokeFilterPipelineAsync(); task = InvokeFilterPipelineAsync();
} }
catch (Exception ex) catch (Exception exception)
{
invokeException = ex;
}
if (invokeException != null)
{ {
return Awaited(this, Task.FromException(invokeException), scope); return Awaited(this, Task.FromException(exception), scope);
} }
Debug.Assert(task != null); Debug.Assert(task != null);
...@@ -94,9 +88,9 @@ namespace Microsoft.AspNetCore.Mvc.Infrastructure ...@@ -94,9 +88,9 @@ namespace Microsoft.AspNetCore.Mvc.Infrastructure
{ {
ReleaseResources(); ReleaseResources();
} }
catch (Exception ex) catch (Exception exception)
{ {
releaseException = ex; releaseException = exception;
} }
Exception scopeException = null; Exception scopeException = null;
...@@ -104,9 +98,9 @@ namespace Microsoft.AspNetCore.Mvc.Infrastructure ...@@ -104,9 +98,9 @@ namespace Microsoft.AspNetCore.Mvc.Infrastructure
{ {
scope.Dispose(); scope.Dispose();
} }
catch (Exception ex) catch (Exception exception)
{ {
scopeException = ex; scopeException = exception;
} }
if (releaseException == null && scopeException == null) if (releaseException == null && scopeException == null)
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册