Skip to content

Commit

Permalink
make better assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
CalvinChangCC committed May 22, 2024
1 parent cbfbfe1 commit a6c9f71
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a6c9f71

Please sign in to comment.