mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 03:06:37 +00:00
Be more lenient with fatalErrors coming out of equal transitions, caused by asynchronicity on the UI layer
This commit is contained in:
committed by
Stefan Ceriu
parent
d90d7adb21
commit
61326ed63a
@@ -277,7 +277,11 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationCoordinatorDelegate,
|
||||
}
|
||||
|
||||
stateMachine.addErrorHandler { context in
|
||||
fatalError("Failed transition with context: \(context)")
|
||||
if context.fromState == context.toState {
|
||||
MXLog.error("Failed transition from equal states: \(context.fromState)")
|
||||
} else {
|
||||
fatalError("Failed transition with context: \(context)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -254,7 +254,11 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
|
||||
}
|
||||
|
||||
stateMachine.addErrorHandler { context in
|
||||
fatalError("Failed transition with context: \(context)")
|
||||
if context.fromState == context.toState {
|
||||
MXLog.error("Failed transition from equal states: \(context.fromState)")
|
||||
} else {
|
||||
fatalError("Failed transition with context: \(context)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -209,7 +209,11 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol {
|
||||
}
|
||||
|
||||
stateMachine.addErrorHandler { context in
|
||||
fatalError("Failed transition with context: \(context)")
|
||||
if context.fromState == context.toState {
|
||||
MXLog.error("Failed transition from equal states: \(context.fromState)")
|
||||
} else {
|
||||
fatalError("Failed transition with context: \(context)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user