public TypedExceptionContext(TypedExceptionContext context) : base(context) { Exception = context.Exception; Response = context.Response; _exceptionHandled = context._exceptionHandled; }
public async Task <Modifiable> OnException(ITypedBuilderContext context, HttpRequestMessage request, HttpResponseMessage response, Exception exception) { TypedExceptionContext handlerContext = null; foreach (var handlerInfo in GetHandlerInfo(HandlerType.Exception)) { if (handlerContext == null) { handlerContext = ((Func <ITypedBuilderContext, HttpRequestMessage, HttpResponseMessage, Exception, TypedExceptionContext>)handlerInfo.InitialConstructor)(context, request, response, exception); } else { handlerContext = ((Func <TypedExceptionContext, TypedExceptionContext>)handlerInfo.ContinuationConstructor)(handlerContext); } await handlerInfo.Handler(handlerContext); } return(handlerContext?.GetHandlerResult()); }
public virtual Task OnException(TypedExceptionContext context) { return(Task.FromResult(true)); }