From 7f5419d81b6b2de7e758592b7ae33b1eae6b651a Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Thu, 28 Oct 2021 10:05:36 -0500 Subject: [PATCH] updated method to always return true if a handler was found, even if there is an error Signed-off-by: Matt Bruce --- .../MVMCoreActionHandler+Extension.swift | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler+Extension.swift b/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler+Extension.swift index aebffa8..04ea87c 100644 --- a/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler+Extension.swift +++ b/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler+Extension.swift @@ -55,20 +55,16 @@ public extension MVMCoreActionHandler { //call the handleAction of the handler actionHandler.handleAction(actionModel, additionalData: additionalData, delegateObject: delegateObject) - - //found the handler and executed the action - return true - + } catch { //log the error if let errorObject = MVMCoreErrorObject.createErrorObject(for: error, location: "") { MVMCoreActionHandler.shared()?.defaultHandleActionError(errorObject, additionalData: additionalData) } - - //there was a handler however something failed - return false } + //found the handler, returning true no matter if there was a failure in the do...catch + return true } /// Start action on current thread.