public IActionResult Error() { var exceptionHandler = HttpContext.Features.Get <IExceptionHandlerPathFeature>(); _customLogger.AddErrorLog(string.Format("Hatanın oluştuğu yer:{0} \nHata mesajı: {1}\nStack Trace: {2}", exceptionHandler.Path, exceptionHandler.Error.Message, exceptionHandler.Error.StackTrace)); ViewBag.Path = exceptionHandler.Path; ViewBag.Message = exceptionHandler.Error.Message; return(View()); }