SnapKit
SnapKit copied to clipboard
No more calls to fatalError
Fixes #537
In this change
- The constraint maker no longer calls
fatalErrorbut emits aConstraintMakerEditablewith an error inside - The
prepareConstraints(item:closure:)method checks for errors and calls theConstraintMakerErrorHandler - The
ConstraintMakerErrorHandlercalls toassertionFailureinstead offatalErrorto prevent production crashers. Its behaviour can be globally overridden - All calls to
fatalErrorhave been changed to callassertionFailure - An unneeded force unwrap has been resolved
- Make
layoutConstraintItemnon optional because its optionality is not needed and not handled well