Witam.
Czy jest jakaś możliwość aby skrypt obsługiwał mi wszystkie błędy ?
Kiedy na przykład zrobię jakąś literówkę to parser wywali mi E_PARSE i
nie wiem czemu ale moja obsługa błędu zostaje pominięta.
Da się coś z tym zrobić ?
<?php set_exception_handler('exception_handler'); function error_handler($code, $message, $file, $line, $bla) { $error = new Error($message, $code, '', false); $error->set_var('file', $file); $error->set_var('line', $line); $error->parse(); } function exception_handler($message) { throw new Error($message, 0, ''); } ?>
<?php // Turn off all error reporting // Report simple running errors // Reporting E_NOTICE can be good too (to report uninitialized // variables or catch variable name misspellings ...) // Report all errors except E_NOTICE // This is the default value set in php.ini // Report all PHP errors (bitwise 63 may be used in PHP 3) // Same as error_reporting(E_ALL); ?>