|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-05-02 10:49 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 06:00:02 2025 UTC |
Description: ------------ Abstract: when handling php errors via set_error_handler() with the intention of throwing a catchable error, an E_FATAL error is triggered. Details: This is similar to the error you might see when attempting to throw an exception from an objects destructor. The internal pointer to the unwinding stack is lost and/or blown away. without the error handler session_start with an invalid save_path will produce an E_WARNING Reproduce code: --------------- <? ini_set('session.save_path', '/var/log'); set_error_handler('save_handler', E_ALL); try { session_start(); } catch (Exception $e) { echo $e->getMessage(); } function save_handler($errno, $errmsg) { throw new Exception('Error caught and thrown as exception: ' . $errmsg); } Expected result: ---------------- Error caught and thrown as exception: session_start(): open(/var/log/sess_3e97dad0fe4ce6f285e97593471f2c88, O_RDWR) failed: Permission denied (13) Actual result: -------------- Error caught and thrown as exception: session_start(): open(/var/log/sess_3e97dad0fe4ce6f285e97593471f2c88, O_RDWR) failed: Permission denied (13) Fatal error: Exception thrown without a stack frame in Unknown on line 0