-
Notifications
You must be signed in to change notification settings - Fork 8k
Adjust filename/lineno for constant expressions #8124
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
Conversation
|
Is there a particular reason, why you chose to explicitly provide an exception specific lineno, instead of feeding it into zend_get_executed_lineno and the file equivalents? (which exceptions read from) |
|
@bwoebi What you're suggesting is returning |
|
essentially yes, just a more appropriate name, like EG(filename_override) EG(lineno_override) or such. |
|
@bwoebi Done |
bwoebi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me :-)
Closes GH-7771
The approach in the PR is to simply replace filename/lineno in the exception, similar to ErrorException. Since there are tons paths for throwing errors in constant expressions I avoided passing the name/lineno by storing it in the execution globals.
Unfortunately the lineno in the AST somewhere. Let me know if this approach is ok before I spend too much time on this.