note 75625 added to language.exceptions

From: Date: Fri, 08 Jun 2007 12:00:31 +0000
Subject: note 75625 added to language.exceptions
Groups: php.notes 
Request: Send a blank email to php-notes+get-127296@lists.php.net to get a copy of this message
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. ---- Server IP: 212.108.64.191 Probable Submitter: 83.70.80.115 ---- Manual Page -- http://www.php.net/manual/en/language.exceptions.php Edit -- https://master.php.net/note/edit/75625 Del: integrated -- https://master.php.net/note/delete/75625/integrated Del: useless -- https://master.php.net/note/delete/75625/useless Del: bad code -- https://master.php.net/note/delete/75625/bad+code Del: spam -- https://master.php.net/note/delete/75625/spam Del: non-english -- https://master.php.net/note/delete/75625/non-english Del: in docs -- https://master.php.net/note/delete/75625/in+docs Del: other reasons-- https://master.php.net/note/delete/75625 Reject -- https://master.php.net/note/reject/75625 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#127296) next »