ZF-6559: Encapsulating exceptions bad for developer
Description
File: Zend/Auth/Adapter/DbTable.php Line: 412
Why do you catch an Exception and throw it with another message? I've spent an hour figuring out why "the supplied parameter (...) failed (...)". When I went deeper, I found out that it is PDOException that holds a message: "permission denied to relation (...)".
I think that exceptions in Zend Framework should be for developers and should provide maximum information about the state of an application.
Comments
Posted by Matthew Weier O'Phinney (matthew) on 2009-05-06T09:44:18.000+0000
Assigning to Ralph
Posted by Marc Bennewitz (private) (mabe) on 2010-01-15T14:00:59.000+0000
Within ZF 1.10 the thrown exception contains the previous exception. To display it simply print the exception or call $exception->getPrevious()