note 75625 deleted from language.exceptions by bjori

From: Date: Fri, 28 Nov 2008 17:29:03 +0000
Subject: note 75625 deleted from language.exceptions by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-147084@lists.php.net to get a copy of this message
Note Submitter: jon at hackcraft dot net ---- Hi corrupted_wise. Your method works, but has a disadvantage in mixing two different error-handling methods. There is clarity to be had in just using set_error_handler or just using try...catch (I recommend the latter). If the code you want to avoid using is further inside the same try block than the code that could throw the exception (or called by code in the same block) then it won't be called in the case of the try block being exited due to an error. Therefore there is no need to use set_error_handler.

« previous php.notes (#147084) next »