Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No more calls to fatalError #538

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open

Conversation

berikv
Copy link

@berikv berikv commented Sep 5, 2018

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

Berik Visschers added 4 commits September 5, 2018 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: No calls to fatalError in production code
1 participant