From 23b76a727619c3de0d696af3d8be41c88cfbfd7e Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sun, 27 Nov 2022 21:46:21 -0500 Subject: [PATCH] Better crash messages for sidebar collapse/expand failures --- Tusker/Screens/Main/MainSplitViewController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tusker/Screens/Main/MainSplitViewController.swift b/Tusker/Screens/Main/MainSplitViewController.swift index 64132510..c69c6f45 100644 --- a/Tusker/Screens/Main/MainSplitViewController.swift +++ b/Tusker/Screens/Main/MainSplitViewController.swift @@ -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)