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

Document when PHP automatically sets the $previous value in new Throwables #3656

Open
lpd-au opened this issue Aug 13, 2024 · 0 comments
Open

Comments

@lpd-au
Copy link

lpd-au commented Aug 13, 2024

As far as I see, php.net doesn't document in what circumstances the $previous value is automatically set when the caller doesn't provide one in the Exception/Error constructor. As far as I know, that happens when new exceptions are thrown in finally blocks, in deconstructors and I guess in any other code somehow run outside of a catch block while the Throwable is still bubbling up the call stack. I expected to find that mentioned in one or more of these pages:

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

No branches or pull requests

1 participant