From a6c9f71e5487ff212349ee9feaf91ecbc2d9e2be Mon Sep 17 00:00:00 2001 From: Calvin Chang Date: Fri, 19 Apr 2024 17:41:26 +0200 Subject: [PATCH] make better assertion --- .../CompositionalLayout/SectionKitCompositionalLayout.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SectionKit/Sources/Utility/CompositionalLayout/SectionKitCompositionalLayout.swift b/SectionKit/Sources/Utility/CompositionalLayout/SectionKitCompositionalLayout.swift index d5d081e8..d507b952 100644 --- a/SectionKit/Sources/Utility/CompositionalLayout/SectionKitCompositionalLayout.swift +++ b/SectionKit/Sources/Utility/CompositionalLayout/SectionKitCompositionalLayout.swift @@ -20,7 +20,8 @@ final public class SectionKitCompositionalLayout: UICollectionViewCompositionalL return .empty } guard case .compositionalLayout(let provider) = sections[index].controller.layoutProvider else { - assertionFailure("Please set the layout provider with `CompositionalLayoutProvider`") + let sectionType = String(describing: type(of: sections[index].controller)) + assertionFailure("Please set the layout provider with `CompositionalLayoutProvider` in \(sectionType)") return .empty } return provider.layoutSectionProvider(environment)