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

Michael M Slusarz slusarz at horde.org
Tue Apr 1 08:54:41 UTC 2014


Quoting Jan Schneider <jan at horde.org>:

>>    Don't use Horde_Db_Exception message as Exception error message
>>
>>    It (may) contain private DB connection parameters. DB errors are useless
>>    to the enduser; they would have already been logged to the log by the
>>    Horde_Db code.
>
> We better make sure that they don't contain this information then.  
> Db exceptions might bubble from all kind of libraries. Plus we don't  
> want to remember which exceptions may be re-trown and which not.

I put this on the H6 TODO list several weeks ago... we really need a  
way to define both a (potentially) end-user message and an admin-level  
message in an Exception.  Kind of like what we do now in  
Horde_Imap_Client - the admin message should be in English, while the  
end-user message can be translated if it exists.

The simplest answer was to remove the PDO exception text completely  
from the DB message.  But since logging is not mandatory, there was  
the very real possibility that a DB error would occur and the calling  
code would have no idea what went wrong.  Not something I want to mess  
with in terms of BC at this point in the release cycle.

michael

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the dev mailing list