From: Marc Steinert <li...@bithub.net>
To: Lamp Lists <lamp.li...@yahoo.com>
Sent: Monday, April 13, 2009 11:27:08 AM
Subject: Re: [PHP] try - catch is not so clear to me...
Basically try-catch gives you the ability to handle errors outside a class or
method scope, by the calling instance.
This comes in handy, if you are programming in an object orientated way and
thus enables you to seperate error handling from the rest of your functionality.
Means, your methods do only the things, they are meant to do, without bothering
to handling occuring errors.
Hope, that made things clearer.
Greetings from Germany
Lamp Lists wrote:
>> hi to all!
>> actually, the statement in the Subject line is not 100% correct. I
>> understand the purpose and how it works (at least I think I understand :-))
>> but to me it's so complicated way?
Synchronize and share your files over the web for free
My Twitter feed
Looks like I still didn't get it correctly:
if (!send_confirmation_email($email, $subject, $content))
throw new Exception('Confirmation email is not sent');
catch (Exception $e)
why am I getting both emails? I'm receiving confirmation email and email with
error message - that I'm supposed to get if the first one is not sent for some
thanks for any help.