puoi settare un error handler che al suo interno farà un throw per teOriginariamente inviato da nourdine
Il 99% delle funzioni native non fa il throw di errori giusto?
Codice PHP:
$old_handler = set_error_handler(create_function('', 'throw new Exception("errore php");'));