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

error PHP4042: Yielding from an exception handling construct (try, catch, finally) is currently not supported by PeachPie. #604

Closed
iWangJiaxiang opened this issue Jan 13, 2020 · 1 comment · Fixed by #749
Labels

Comments

@iWangJiaxiang
Copy link

Hi, developers.

Thank you for such an amazing peachpie. I have resolved many Type name could not be resolved. issue in my peachpie project and it all most works.

But finally the remaning issues are all error PHP4042: Yielding from an exception handling construct (try, catch, finally) is currently not supported by PeachPie.. Such as

/root/projects/PeachPie.Test/Website/3rdparty/symfony/cache/Adapter/FilesystemTagAwareAdapter.php(161,21): error PHP4042: Yielding from an exception handling construct (try, catch, finally) is currently not
supported by PeachPie. [/root/projects/PeachPie.Test/Website/Website.msbuildproj]
···

It seems like these php packages use the grammar unsupported by peachpie. Do you have any plan to do this? Or, is there anything I could do to help you. (I write .Net)

@jakubmisek
Copy link
Member

Hi, thank you! we have plans to support yield in try/catch, but currently it is too complicated (.NET does not allow jumping into try/catch blocks, or jumping out of try/catch without invoking finally ... we'll keep you updated here

jakubmisek added a commit that referenced this issue May 9, 2020
ref #604
- yield can be in try block (not catch nor finally yet)
- fixes emitted "return" in generator within exception handling (.ret is not allowed there)
jakubmisek added a commit that referenced this issue May 9, 2020
@jakubmisek jakubmisek mentioned this issue May 10, 2020
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants