Exemple #1
0
        public async Task Invoke(HttpContext context)
        {
            Maybe <Problem> problem;

            try
            {
                await _next(context);

                problem = _contextProblemDetectionHandler.CheckForProblem(context);
            }
            catch (Exception exception)
            {
                problem = _exceptionProblemDetectionHandler.ExtractProblem(exception);
            }

            if (problem.HasValue)
            {
                await DumpProblemAsync(context, problem.Value);
            }
        }