public bool Handle(Exception exception, out ExceptionHandledResult result)
        {
            if (_exceptionResults.TryGetValue(exception.GetType(), out var status))
            {
                result = new ExceptionHandledResult(status, exception.Message);
                return(true);
            }

            result = null;
            return(false);
        }
Exemple #2
0
 public bool Handle(Exception exception, out ExceptionHandledResult result)
 {
     result = new ExceptionHandledResult(HttpStatusCode.InternalServerError, "Internal Server Error");
     return(true);
 }