- Add sourceFile and startLine properties to FunctionDef entity - Track PHP source file and line number during preprocessing - Generate proper file location context for AOT runtime exceptions - Implement entry script prefixing with correct line numbers - Update eval calls to include source file information - Create test case for main file location reporting in exceptionspull/17/head
parent
d54268fd8d
commit
c494622ae4
5 changed files with 42 additions and 3 deletions
@ -0,0 +1,7 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
|
||||||
|
function main() |
||||||
|
{ |
||||||
|
throw new Exception("test"); |
||||||
|
} |
||||||
@ -0,0 +1,21 @@ |
|||||||
|
--TEST-- |
||||||
|
Uncaught AOT exception uses the PHP file containing main() |
||||||
|
--FILE-- |
||||||
|
<?php |
||||||
|
class MainFileLocationExample |
||||||
|
{ |
||||||
|
public function fail(): void |
||||||
|
{ |
||||||
|
throw new RuntimeException('location-test'); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
function main(): void |
||||||
|
{ |
||||||
|
(new MainFileLocationExample())->fail(); |
||||||
|
} |
||||||
|
?> |
||||||
|
--EXPECTF-- |
||||||
|
Fatal error: Uncaught RuntimeException: location-test in %smain-file-location.php:10 |
||||||
|
Stack trace: |
||||||
|
%A |
||||||
Loading…
Reference in new issue