PHP의 restore_exception_handler () 함수
정의 및 사용
restore_exception_handler () 함수는 이전의 예외 처리기를 복원한다.
이 기능은 이전의 예외 핸들러 후의 회복을 변경 set_exception_handler () 함수에 의해 사용된다.
이 기능은 항상 TRUE를 반환합니다.
문법
restore_exception_handler()
팁과주의 사항
팁 : 예외 처리기가 예외 핸들러 또는 내장 사용자 정의 함수에 내장 될 수있다십시오.
예
<?php
restore_exception_handler();
throw new Exception('Uncaught Exception occured');
?>
restore_exception_handler();
throw new Exception('Uncaught Exception occured');
?>
다음 위 코드의 출력은 :
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
전체 PHP 오류 참조