updated method to always return true if a handler was found, even if there is an error
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
9a158c4909
commit
7f5419d81b
@ -55,20 +55,16 @@ public extension MVMCoreActionHandler {
|
|||||||
|
|
||||||
//call the handleAction of the handler
|
//call the handleAction of the handler
|
||||||
actionHandler.handleAction(actionModel, additionalData: additionalData, delegateObject: delegateObject)
|
actionHandler.handleAction(actionModel, additionalData: additionalData, delegateObject: delegateObject)
|
||||||
|
|
||||||
//found the handler and executed the action
|
|
||||||
return true
|
|
||||||
|
|
||||||
} catch {
|
} catch {
|
||||||
//log the error
|
//log the error
|
||||||
if let errorObject = MVMCoreErrorObject.createErrorObject(for: error, location: "") {
|
if let errorObject = MVMCoreErrorObject.createErrorObject(for: error, location: "") {
|
||||||
MVMCoreActionHandler.shared()?.defaultHandleActionError(errorObject, additionalData: additionalData)
|
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.
|
/// Start action on current thread.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user