Better crash messages for sidebar collapse/expand failures

This commit is contained in:
Shadowfacts 2022-11-27 21:46:21 -05:00
parent d8f503351b
commit 23b76a7276
1 changed files with 2 additions and 2 deletions

View File

@ -238,7 +238,7 @@ extension MainSplitViewController: UISplitViewControllerDelegate {
case .discoverHeader, .listsHeader, .addList, .savedHashtagsHeader, .addSavedHashtag, .savedInstancesHeader, .addSavedInstance:
// These items are not selectable in the sidebar collection view, so this code is unreachable.
fatalError("unreachable")
fatalError("unexpected selected sidebar item: \(sidebar.selectedItem!)")
}
}
@ -313,7 +313,7 @@ extension MainSplitViewController: UISplitViewControllerDelegate {
case is ProfileDirectoryViewController:
exploreItem = .profileDirectory
default:
fatalError("unhandled second-level explore screen")
fatalError("unhandled second-level explore screen: \(tabNavigationStack[1])")
}
}
transferNavigationStack(from: tabNavController, to: exploreItem!, skipFirst: 1, prepend: toPrepend)