diff --git a/fsm/common/src/commonMain/kotlin/dev/inmo/micro_utils/fsm/common/StatesMachine.kt b/fsm/common/src/commonMain/kotlin/dev/inmo/micro_utils/fsm/common/StatesMachine.kt index 88eb9132f97..81d5f773a96 100644 --- a/fsm/common/src/commonMain/kotlin/dev/inmo/micro_utils/fsm/common/StatesMachine.kt +++ b/fsm/common/src/commonMain/kotlin/dev/inmo/micro_utils/fsm/common/StatesMachine.kt @@ -71,7 +71,11 @@ open class DefaultStatesMachine ( /** * Will call [launchStateHandling] for state handling */ - override suspend fun StatesMachine.handleState(state: T): T? = launchStateHandling(state, handlers, onStateHandlingErrorHandler) + override suspend fun StatesMachine.handleState(state: T): T? = launchStateHandling(state, handlers) + + override suspend fun launchStateHandling(state: T, handlers: List>): T? { + return launchStateHandling(state, handlers, onStateHandlingErrorHandler) + } /** * This @@ -80,7 +84,7 @@ open class DefaultStatesMachine ( protected val statesJobsMutex = Mutex() protected open suspend fun performUpdate(state: T) { - val newState = launchStateHandling(state, handlers, onStateHandlingErrorHandler) + val newState = launchStateHandling(state, handlers) if (newState != null) { statesManager.update(state, newState) } else {