PHP restore_exception_handler() İşlevi
Örnek
İstisna işleyici örneğini geri yükle:
<?php
// Two user-defined exception handler functions
function myException1($exception)
{
echo "[" . __FUNCTION__ . "]" . $exception->getMessage();
}
function myException2($exception)
{
echo "[" . __FUNCTION__ . "]" . $exception->getMessage();
}
set_exception_handler("myException1");
set_exception_handler("myException2");
restore_exception_handler();
// Throw exception
throw new Exception("This triggers the first exception handler...");
?>
Tanım ve Kullanım
restore_exception_handler() işlevi, önceki istisna işleyicisini geri yükler.
Bu işlev, set_exception_handler() işleviyle değiştirdikten sonra önceki istisna işleyicisini geri yüklemek için kullanılır .
İpucu: Önceki istisna işleyici, yerleşik istisna işleyici veya kullanıcı tanımlı bir istisna işleyici işlevi olabilir.
Sözdizimi
restore_exception_handler();
Teknik detaylar
Geri dönüş değeri: | Herzaman doğru |
---|---|
PHP Sürümü: | 5.0+ |
PHP Hata Referansı