array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'tr', ), 'this' => array ( 0 => 'function.restore-exception-handler.php', 1 => 'restore_exception_handler', ), 'up' => array ( 0 => 'ref.errorfunc.php', 1 => 'Hata İşleme İşlevleri', ), 'prev' => array ( 0 => 'function.restore-error-handler.php', 1 => 'restore_error_handler', ), 'next' => array ( 0 => 'function.set-error-handler.php', 1 => 'set_error_handler', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'tr', 'path' => 'reference/errorfunc/functions/restore-exception-handler.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5, PHP 7, PHP 8)
restore_exception_handler — Bir önceki istisna eylemcisini devreye sokar
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.
Bu işlevin bağımsız değişkeni yoktur.
Daima true
döndürür.
Ö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...