-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
Wrong line & file on error trace #18105
Comments
Also on 8.3 |
The problem is that here the filename is set "incorrectly": php-src/Zend/zend_exceptions.c Lines 280 to 284 in 6329248
The line number comes from the trait as that is stored by the compiler in the AST. |
Okay I see. |
Description
definitions.php
main.php
RESULT :
Fatal error: Uncaught Exception: I expect to indicate file definitions.php on line 7 but it throws in ./main.php:16
Stack trace:
#0 ./definitions.php(7): constant expression
#1 ./definitions.php(16): ThrowableParam->__construct()
#2 ./main/php(11): Foo->execute()
#3 {main}
thrown in /var/www/html/nbcloud/_tests/bugPHP.php on line 16
BUT EXPECT :
Fatal error: Uncaught Exception: I expect to indicate file definitions.php on line 7 but it throws in ./definitions.php:7
Stack trace:
#0 ./definitions.php(7): constant expression
#1 ./definitions.php(16): ThrowableParam->__construct()
#2 ./main/php(11): Foo->execute()
#3 {main}
thrown in /var/www/html/nbcloud/_tests/bugPHP.php on line 16
PHP Version
8.4.5
Operating System
Debian 11
The text was updated successfully, but these errors were encountered: