From ab978baf7e5a471f10d3848fa71d6689b4483c52 Mon Sep 17 00:00:00 2001 From: HARSHIT SINHA <47042785+hsinha610@users.noreply.github.com> Date: Thu, 25 Jul 2024 16:46:52 +0530 Subject: [PATCH] Fixed: Exception Handling in Evaluation (#46) --- src/main/kotlin/com/featurevisor/sdk/Instance+Evaluation.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/com/featurevisor/sdk/Instance+Evaluation.kt b/src/main/kotlin/com/featurevisor/sdk/Instance+Evaluation.kt index e6881d8..0946458 100644 --- a/src/main/kotlin/com/featurevisor/sdk/Instance+Evaluation.kt +++ b/src/main/kotlin/com/featurevisor/sdk/Instance+Evaluation.kt @@ -640,14 +640,13 @@ fun FeaturevisorInstance.evaluateVariable( logger?.debug("using default value", evaluation.toDictionary()) return evaluation } - }catch (e: Exception){ + } catch (e: Exception){ evaluation = Evaluation( featureKey = featureKey, reason = ERROR, - error(e) ) - this.logger?.error("error", evaluation.toDictionary()) + this.logger?.error(message = e.message.orEmpty(), details = evaluation.toDictionary()) return evaluation }