PHP restore_exception_handler() 函數(shù)
定義和用法
restore_exception_handler() 函數(shù)恢復(fù)之前的異常處理程序,該程序是由 set_exception_handler() 函數(shù)改變的。
該函數(shù)永遠(yuǎn)返回 true。
語(yǔ)法
restore_exception_handler()
提示和注釋
提示:之前的異常處理程序可能是在異常處理程序或用戶自定義函數(shù)中構(gòu)建的。
例子
<?php restore_exception_handler(); throw new Exception('Uncaught Exception occured'); ?>
輸出:
Fatal error: Uncaught exception 'Exception' with message 'Uncaught Exception occured' in C:\webfolder\test.php:4 Stack trace: #0 {main} thrown in C:\webfolder\test.php on line 4