Hi!

Ok, I guess that would work.

However, would you consider having another look at
Zend_Controller_Request::getParam() or even Zend_Form::getValue()?  Neither
throws any exception when I try to get a non existing value.  Would that be
ok with you?  I think consistency would be nice here ;)

Just to clarify, I thought exceptions where needed for exceptional cases?
Since errors are meant for error cases, and since getting an optional value
is -to my mind at least- an absolutely normal case, I don't think it would
be a stretch to not throw exceptions here.

Thanks in any case!
Regards,

--
Guillaume Rossolini



On Tue, Aug 5, 2008 at 7:38 PM, Nico Edtinger <
[EMAIL PROTECTED]> wrote:

> Hi Guillaume!
>
> That's actually something I have on my TODO list. While an exception is
> normally correct, because the value can't be returned, it's something that
> gets really annoying in the view. What I've planned is adding an option to
> turn these exceptions off and return null instead.
>
> nico
>
>
> Guillaume Rossolini wrote:
>
>> Hi,
>>
>> I just noticed that Zend_Mail_Message::getHeader() throws an exception
>> when
>> I try to get a header that is not there.  For instance, the "reply-to"
>> header isn't mandatory.
>> Do you think I should put try/catch blocks in my code? Or maybe
>> subclassing
>> Zend_Mail_Message to return a false boolean would be a more sensible
>> approach?
>>
>> Thanks,
>>
>> --
>> Guillaume Rossolini
>>
>
>

Reply via email to