SnapKit icon indicating copy to clipboard operation
SnapKit copied to clipboard

No more calls to fatalError

Open berikv opened this issue 7 years ago • 0 comments

Fixes #537

In this change

  • The constraint maker no longer calls fatalError but emits a ConstraintMakerEditable with an error inside
  • The prepareConstraints(item:closure:) method checks for errors and calls the ConstraintMakerErrorHandler
  • The ConstraintMakerErrorHandler calls to assertionFailure instead of fatalError to prevent production crashers. Its behaviour can be globally overridden
  • All calls to fatalError have been changed to call assertionFailure
  • An unneeded force unwrap has been resolved
  • Make layoutConstraintItem non optional because its optionality is not needed and not handled well

berikv avatar Sep 05 '18 13:09 berikv