restore_exception_handler
(PHP 5)
restore_exception_handler — Bir önceki istisna eylemcisini devreye sokar
Açıklama
bool restore_exception_handler
( void
)
set_exception_handler() ile istisna eylemcisini değiştirdikten sonra önceki istisna eylemcisini (yerleşik veya kullanıcı tanımlı bir işlev) devreye sokmak için kullanılır.
Dönen Değerler
Bu işlev daima TRUE döndürür.
Örnekler
Örnek 1 - restore_exception_handler() örneği
<?php
function istisna_eylemci_1(Exception $e)
{
echo '[' . __FUNCTION__ . '] ' . $e->getMessage();
}
function istisna_eylemci_2(Exception $e)
{
echo '[' . __FUNCTION__ . '] ' . $e->getMessage();
}
set_exception_handler('istisna_eylemci_1');
set_exception_handler('istisna_eylemci_2');
restore_exception_handler();
throw new Exception('İlk istisna eylemcisi tetiklenir...');
?>
Yukarıdaki örneğin çıktısı:
[istisna_eylemci_1] İlk istisna eylemcisi tetiklenir...
Ayrıca Bakınız
- set_exception_handler() - Kullanıcı tanımlı bir istisna eylemcisi bildirir
- set_error_handler() - Kullanıcı tanımlı bir hata eylemcisi bildirir
- restore_error_handler() - Bir önceki hata eylemcisini devreye sokar
- error_reporting() - Hangi PHP hatalarının raporlanacağını tanımlar
restore_exception_handler
There are no user contributed notes for this page.
