|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2019-12-04 13:03 UTC] sjon@php.net
[2019-12-04 13:03 UTC] sjon@php.net
-Status: Open
+Status: Feedback
[2019-12-04 13:20 UTC] sailormax at inbox dot lv
[2019-12-15 04:22 UTC] php-bugs at lists dot php dot net
[2019-12-15 08:41 UTC] nikic@php.net
-Status: No Feedback
+Status: Re-Opened
[2019-12-15 08:41 UTC] nikic@php.net
[2021-12-01 17:52 UTC] cmb@php.net
-Status: Re-Opened
+Status: Closed
-Package: Unknown/Other Function
+Package: Scripting Engine problem
-Assigned To:
+Assigned To: cmb
[2021-12-01 17:52 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 18:00:02 2025 UTC |
Description: ------------ default Exception handler and error_get_last() return error message with not full stack trace. When use large libraries like PHPSpreadsheet and got exception, message with stack trace contain only PHPSpreadsheet internal calls but where you call it is offcut. Test script: --------------- <? $limiter = 20; $func = function() use (&$limiter, &$func) { $limiter--; if (!$limiter) { print "<pre>"; debug_print_backtrace(); throw new Exception("test error"); } if ($limiter <= 0) return; $func(); }; $func(); ?> Expected result: ---------------- 0 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #1 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #2 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #3 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #4 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #5 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #6 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #7 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #8 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #9 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #10 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #11 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #12 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #13 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #14 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #15 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #16 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #17 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #18 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #19 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] Fatal error: Uncaught Exception: test error in D:\max\Documents\GitHub\atom\test.php:9 Stack trace: #0 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #1 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #2 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #3 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #4 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #5 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #6 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #7 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #8 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #9 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #10 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #11 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #12 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #13 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #14 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #15 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #16 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #17 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #18 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #19 D:\max\Documents\GitHub\atom\test.php(14): {closure}() in D:\max\Documents\GitHub\atom\test.php on line 9 Actual result: -------------- 0 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #1 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #2 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #3 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #4 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #5 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #6 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #7 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #8 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #9 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #10 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #11 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #12 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #13 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #14 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #15 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #16 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #17 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #18 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] #19 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14] Fatal error: Uncaught Exception: test error in D:\max\Documents\GitHub\atom\test.php:9 Stack trace: #0 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #1 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #2 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #3 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #4 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #5 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #6 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #7 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #8 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #9 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #10 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #11 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #12 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #13 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #14 D:\max\Documents\GitHub\atom\test.php(14): {closure}() #1 in D:\max\Documents\GitHub\atom\test.php on line 9