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

enable_exceptions does not work properly in all cases #755

Open
jtojnar opened this issue Oct 18, 2022 · 0 comments
Open

enable_exceptions does not work properly in all cases #755

jtojnar opened this issue Oct 18, 2022 · 0 comments
Labels

Comments

@jtojnar
Copy link
Contributor

jtojnar commented Oct 18, 2022

We have a method to enable throwing exceptions on error but it does not work in all cases. For example here, the old error handling is still used.

Maybe we should convert setting $this->error to throwing an exception on failure everywhere internally, catch it at the top level in the public functions, and rethrow it if enable_exceptions is true. And deprecate the enable_exceptions method.

For 2.0, we could then remove the try-catch statements and the enable_exceptions method.

cc @Art4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants