Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add IGListExperimentThrowOnInconsistencyException
Summary: Currently, we don't throw on `NSInternalInconsistencyException` as a temporary workaround, but there's a few issues with that: 1) `IGFailure` doesn't collect nearly as much information as exceptions, so it's difficult to debug. We could add more context to it, but feels like we should just fix the underlying issue instead, and remove the workaround. 2) If we throw in an animated update, all app animations break because `[UIView performWithoutAnimation:...]` doesn’t close properly. 3) Continuing to use the `UICollectionView` after it throws feels a bit risky IMO. There's no guarantee that it should work properly after that. Lets reintroduce the exception slowly, fix each problem, and eventually remove the workaround. In the future, we could do 2 other things: 1) Make `IGListExceptionDoctor` that can look at an exception's details and diagnose the issue, or at least provide more context. 2) Check if the updates make sense before telling the `UICollectionView`, so we can fallback to a `-reloadData`. This would shift the problem from a crash to a performance regression, so not ideal, but maybe less worse for production. I'll add the experiment set-up in the next diffs. Differential Revision: D50426255 fbshipit-source-id: 26e21d3dfcf4670ed07f397cf0d4decdda08eec5
- Loading branch information