PHP restore_exception_handler () function
Definition and Usage
restore_exception_handler () function to restore the previous exception handler.
This function is used by set_exception_handler () function to change the recovery after the previous exception handler.
This function always returns TRUE.
grammar
restore_exception_handler()
Tips and Notes
Tip: Before exception handler may be built in an exception handler or a user-defined function built in.
Examples
<?php
restore_exception_handler();
throw new Exception('Uncaught Exception occured');
?>
restore_exception_handler();
throw new Exception('Uncaught Exception occured');
?>
The output of the code above is as follows:
Fatal error: Uncaught exception 'Exception' with message
'Uncaught Exception occured' in C:webfoldertest.php:4
Stack trace: #0 {main} thrown inC:webfoldertest.phpon line4
'Uncaught Exception occured' in C:webfoldertest.php:4
Stack trace: #0 {main} thrown inC:webfoldertest.phpon line4
Complete PHP Error Reference