From 0c9225def149d1cccb506609ee841f83b78e9548 Mon Sep 17 00:00:00 2001 From: Sam Carter Date: Tue, 6 Aug 2024 08:24:34 +0100 Subject: [PATCH] Updated the catch exception to log the error --- .../Controllers/QualificationDetailsController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Dfe.EarlyYearsQualification.Web/Controllers/QualificationDetailsController.cs b/src/Dfe.EarlyYearsQualification.Web/Controllers/QualificationDetailsController.cs index bb6b2558..7db3a6e6 100644 --- a/src/Dfe.EarlyYearsQualification.Web/Controllers/QualificationDetailsController.cs +++ b/src/Dfe.EarlyYearsQualification.Web/Controllers/QualificationDetailsController.cs @@ -207,9 +207,9 @@ private T GetRatioProperty(string propertyToCheck, string ratioName, Qualific return (T)requirement!.GetType().GetProperty(propertyToCheck)!.GetValue(requirement, null)!; } - catch + catch(Exception ex) { - logger.LogError("Could not find property: {PropertyToCheck} within {RatioName} for qualification: {QualificationId}", + logger.LogError(ex,"Could not find property: {PropertyToCheck} within {RatioName} for qualification: {QualificationId}", propertyToCheck, ratioName, qualification.QualificationId); throw; }