Re: Re: PEAR's Error Handling and PHP5

From: Date: Wed, 07 Jun 2006 21:55:23 +0000
Subject: Re: Re: PEAR's Error Handling and PHP5
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-42847@lists.php.net to get a copy of this message
Markus Wolff wrote:
Am Wednesday 07 June 2006 23:22 schrieb Lukas Smith:
The point is you have multiple independent methods, modules or whatever that interact on some level that means that you are likely to break one piece when messing with certain things in another.
Yay, that's the first valid example I have ever read that's contra exceptions! Nicely done :-)
Being saying that since ever ..
If you just want to mess around and see the difference between schema version A and B while suppressing the others without having to add tons of try...catch blocks around them, though, you could just put something like this into your code: function leaveMeAlone($ex) {} set_exception_handler('leaveMeAlone'); This should allow testing without unhandled exceptions blocking your script excecution.
No it would not. Because that exception handler would only trigger at the most outer level. But as I have said, this example is not new. I have been mentioning it since ages. I guess most people do not do this kind of prototyping otherwise my argument would have been able to convince more people. Actually I do not think I ever convinced anyone from the Exception camp. arg .. must stop talking about the pros and cons of Exceptions .. regards, Lukas

« previous php.pear.dev (#42847) next »