1 type derived from ExceptionContext
Microsoft.AspNetCore.Mvc.Core (1)
Infrastructure\ResourceInvoker.cs (1)
1584private sealed class ExceptionContextSealed : ExceptionContext
100 references to ExceptionContext
BasicWebSite (1)
Filters\TestExceptionFilter.cs (1)
11public override void OnException(ExceptionContext context)
Microsoft.AspNetCore.Mvc.Abstractions (5)
Filters\ExceptionContext.cs (1)
18/// Instantiates a new <see cref="ExceptionContext"/> instance.
Filters\IAsyncExceptionFilter.cs (2)
14/// <param name="context">The <see cref="ExceptionContext"/>.</param> 16Task OnExceptionAsync(ExceptionContext context);
Filters\IExceptionFilter.cs (2)
14/// <param name="context">The <see cref="ExceptionContext"/>.</param> 15void OnException(ExceptionContext context);
Microsoft.AspNetCore.Mvc.Core (16)
Diagnostics\MvcDiagnostics.cs (6)
522/// An <see cref="EventData"/> that occurs before <see cref="IExceptionFilter.OnException(ExceptionContext)"/>. 537public BeforeExceptionFilterOnException(ActionDescriptor actionDescriptor, ExceptionContext exceptionContext, IFilterMetadata filter) 552public ExceptionContext ExceptionContext { get; } 573/// An <see cref="EventData"/> that occurs after <see cref="IExceptionFilter.OnException(ExceptionContext)"/>. 588public AfterExceptionFilterOnExceptionEventData(ActionDescriptor actionDescriptor, ExceptionContext exceptionContext, IFilterMetadata filter) 603public ExceptionContext ExceptionContext { get; }
Filters\ExceptionFilterAttribute.cs (2)
17public virtual Task OnExceptionAsync(ExceptionContext context) 26public virtual void OnException(ExceptionContext context)
MvcCoreDiagnosticListenerExtensions.cs (8)
378ExceptionContext exceptionContext, 392private static void BeforeOnExceptionAsyncImpl(DiagnosticListener diagnosticListener, ExceptionContext exceptionContext, IAsyncExceptionFilter filter) 408ExceptionContext exceptionContext, 422private static void AfterOnExceptionAsyncImpl(DiagnosticListener diagnosticListener, ExceptionContext exceptionContext, IAsyncExceptionFilter filter) 438ExceptionContext exceptionContext, 452private static void BeforeOnExceptionImpl(DiagnosticListener diagnosticListener, ExceptionContext exceptionContext, IExceptionFilter filter) 468ExceptionContext exceptionContext, 482private static void AfterOnExceptionImpl(DiagnosticListener diagnosticListener, ExceptionContext exceptionContext, IExceptionFilter filter)
Microsoft.AspNetCore.Mvc.Core.Test (3)
ApplicationModels\DefaultApplicationModelProviderTest.cs (1)
1818public void OnException(ExceptionContext context)
Infrastructure\ControllerActionInvokerTest.cs (2)
784.Setup(f => f.OnException(It.IsAny<ExceptionContext>())) 785.Callback<ExceptionContext>((c) =>
Microsoft.AspNetCore.Mvc.Core.TestCommon (73)
CommonResourceInvokerTest.cs (73)
41.Setup(f => f.OnException(It.IsAny<ExceptionContext>())) 50filter.Verify(f => f.OnException(It.IsAny<ExceptionContext>()), Times.Never()); 59.Setup(f => f.OnExceptionAsync(It.IsAny<ExceptionContext>())) 60.Returns<ExceptionContext>((context) => Task.FromResult(true)) 70f => f.OnExceptionAsync(It.IsAny<ExceptionContext>()), 88.Setup(f => f.OnException(It.IsAny<ExceptionContext>())) 92.Setup(f => f.OnException(It.IsAny<ExceptionContext>())) 93.Callback<ExceptionContext>(context => 110filter2.Verify(f => f.OnException(It.IsAny<ExceptionContext>()), Times.Once()); 130.Setup(f => f.OnExceptionAsync(It.IsAny<ExceptionContext>())) 131.Returns<ExceptionContext>((context) => Task.FromResult(true)) 135.Setup(f => f.OnExceptionAsync(It.IsAny<ExceptionContext>())) 136.Callback<ExceptionContext>(context => 144.Returns<ExceptionContext>((context) => Task.FromResult(true)) 155f => f.OnExceptionAsync(It.IsAny<ExceptionContext>()), 170.Setup(f => f.OnException(It.IsAny<ExceptionContext>())) 171.Callback<ExceptionContext>(context => 185f => f.OnException(It.IsAny<ExceptionContext>()), 203.Setup(f => f.OnException(It.IsAny<ExceptionContext>())) 204.Callback<ExceptionContext>(context => 223f => f.OnException(It.IsAny<ExceptionContext>()), 237.Setup(f => f.OnException(It.IsAny<ExceptionContext>())) 238.Callback<ExceptionContext>(context => 251f => f.OnException(It.IsAny<ExceptionContext>()), 269.Setup(f => f.OnException(It.IsAny<ExceptionContext>())) 270.Callback<ExceptionContext>(context => 289f => f.OnException(It.IsAny<ExceptionContext>()), 303.Setup(f => f.OnExceptionAsync(It.IsAny<ExceptionContext>())) 304.Callback<ExceptionContext>(context => 308.Returns<ExceptionContext>((context) => Task.FromResult(true)) 319f => f.OnExceptionAsync(It.IsAny<ExceptionContext>()), 337.Setup(f => f.OnExceptionAsync(It.IsAny<ExceptionContext>())) 338.Callback<ExceptionContext>(context => 343.Returns<ExceptionContext>((context) => Task.FromResult(true)) 358f => f.OnExceptionAsync(It.IsAny<ExceptionContext>()), 372.Setup(f => f.OnExceptionAsync(It.IsAny<ExceptionContext>())) 373.Callback<ExceptionContext>(context => 377.Returns<ExceptionContext>((context) => Task.FromResult(true)) 387f => f.OnExceptionAsync(It.IsAny<ExceptionContext>()), 405.Setup(f => f.OnExceptionAsync(It.IsAny<ExceptionContext>())) 406.Callback<ExceptionContext>(context => 411.Returns<ExceptionContext>((context) => Task.FromResult(true)) 426f => f.OnExceptionAsync(It.IsAny<ExceptionContext>()), 444.Setup(f => f.OnExceptionAsync(It.IsAny<ExceptionContext>())) 445.Callback<ExceptionContext>(context => 449.Returns<ExceptionContext>((context) => Task.FromResult(true)) 454.Setup(f => f.OnException(It.IsAny<ExceptionContext>())) 455.Callback<ExceptionContext>(c => { }) // Does nothing, we just want to verify that it was called. 468filter1.Verify(f => f.OnExceptionAsync(It.IsAny<ExceptionContext>()), Times.Once()); 469filter2.Verify(f => f.OnException(It.IsAny<ExceptionContext>()), Times.Once()); 479.Setup(f => f.OnException(It.IsAny<ExceptionContext>())) 488filter.Verify(f => f.OnException(It.IsAny<ExceptionContext>()), Times.Once()); 503.Setup(f => f.OnException(It.IsAny<ExceptionContext>())) 504.Callback<ExceptionContext>(c => c.Result = result.Object) 515filter.Verify(f => f.OnException(It.IsAny<ExceptionContext>()), Times.Once()); 531.Setup(f => f.OnException(It.IsAny<ExceptionContext>())) 532.Callback<ExceptionContext>(c => c.Result = result.Object) 537.Setup(f => f.OnException(It.IsAny<ExceptionContext>())) 538.Callback<ExceptionContext>(c => { }) // Does nothing, we just want to verify that it was called. 551filter1.Verify(f => f.OnException(It.IsAny<ExceptionContext>()), Times.Once()); 552filter2.Verify(f => f.OnException(It.IsAny<ExceptionContext>()), Times.Once()); 570exceptionFilter.Verify(f => f.OnException(It.IsAny<ExceptionContext>()), Times.Never()); 695.Setup(f => f.OnException(It.IsAny<ExceptionContext>())) 696.Callback<ExceptionContext>(context => 728exceptionFilter.Verify(f => f.OnException(It.IsAny<ExceptionContext>()), Times.Never()); 1254.Setup(f => f.OnException(It.IsAny<ExceptionContext>())) 1255.Callback<ExceptionContext>((c) => 1945.Setup(f => f.OnExceptionAsync(It.IsAny<ExceptionContext>())) 1946.Returns<ExceptionContext>(c => 1976.Setup(f => f.OnException(It.IsAny<ExceptionContext>())) 1977.Callback<ExceptionContext>(c => c.Result = Result); 2005.Setup(f => f.OnException(It.IsAny<ExceptionContext>())) 2006.Callback<ExceptionContext>(c => c.Result = Result);
Microsoft.AspNetCore.Mvc.RazorPages.Test (2)
Infrastructure\PageActionInvokerTest.cs (2)
1314.Setup(f => f.OnException(It.IsAny<ExceptionContext>())) 1315.Callback<ExceptionContext>((c) =>