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

Dont rely on exception in node.exist #308

Merged
merged 4 commits into from
Mar 4, 2020
Merged

Conversation

ferdonline
Copy link
Contributor

The implementation of Node.exist() required catching an exception that we generated ourselves. Despite being a simple principle, it kind of used exceptions for flow control and In some compiler toolchains (QT) this would create unwanted error messages (#224, #289)

This PR

Makes the low-level _exist function conditionally treat the error as a normal false, not throwing exception. This design even simplified the implementation of the public exist() method.

Fixes #289

@ferdonline ferdonline requested a review from alkino March 4, 2020 09:12
alexsavulescu
alexsavulescu previously approved these changes Mar 4, 2020
alexsavulescu
alexsavulescu previously approved these changes Mar 4, 2020
@ferdonline
Copy link
Contributor Author

@alexsavulescu sorry, github always dimisses even on small changes. I dont intend to change more

@ferdonline ferdonline merged commit 54b3699 into master Mar 4, 2020
@ferdonline ferdonline deleted the improv/exist_simplify branch March 4, 2020 10:47
@alkino alkino mentioned this pull request Mar 10, 2020
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.

MSVC: Exception Trigger
2 participants