fastsol Posted May 23, 2015 Share Posted May 23, 2015 I have implemented a custom error handling and it logs the errors to a DB with the standard file name, line number, code number and error string. But I can't find anything on how to get the full call stack that lead to the error. Maybe it's not possible using set_error_handler(). I'm also using register_shutdown_function() to catch fatal errors, but same situation with the call stack. So can I get the call stack/stack trace whatever? Link to comment https://forums.phpfreaks.com/topic/296465-how-to-get-error-call-stack-with-set_error_handler/ Share on other sites More sharing options...
requinix Posted May 24, 2015 Share Posted May 24, 2015 Not with set_error_handler() per se, but debug_backtrace will work. It may include the call to the error handler too (probably) so you'll want to trim that off. Link to comment https://forums.phpfreaks.com/topic/296465-how-to-get-error-call-stack-with-set_error_handler/#findComment-1512533 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.