[dev] [commits] Horde branch master updated. d3a3a8ba4f403b2c05c0573ca519b7e349a8c657

Chuck Hagenbuch chuck at horde.org
Wed Jul 15 13:42:06 UTC 2009


Quoting Jan Schneider <jan at horde.org>:

> Zitat von Chuck Hagenbuch <chuck at horde.org>:
>
>> Quoting Jan Schneider <jan at horde.org>:
>>
>>>> http://git.horde.org/diff.php/framework/Core/lib/Horde/Registry.php?rt=horde-git&r1=b8577e2c3f7bcf9be4a61ef9bca861f4b04a1083&r2=5ff300faf90378ba5fa0d61a454893813f28e584
>>>>
>>>> -----------------------------------------------------------------------
>>>
>>> I don't think it's good practice to use exceptions for anything  
>>> but throwing. Beside that, wrapping in a class when we need the  
>>> different parts (message, file, line) later anyway, is unnecessary  
>>> IMO.
>>
>> I agree. Also, if the goal is to get rid of __FILE__ and __LINE__  
>> (a good goal), we can just use debug_backtrace() to get that.
>
> What's wrong with __FILE__ and __LINE__? Passing debug_backtrace()  
> around seem like overhead to me. Or you just talking about  
> Horde::fatal()?

Nothing is wrong with __FILE__ and __LINE__, but putting them in every  
method call is a bit ugly, and also unnecessary. I'm just saying that  
Horde::fatal, or the exception handler, can get that information from  
debug_backtrace(), instead of us having to pass it.

-chuck


More information about the dev mailing list