ZF-6559: Encapsulating exceptions bad for developer

Issue Type: Improvement Created: 2009-05-06T08:08:53.000+0000 Last Updated: 2010-01-15T14:00:59.000+0000 Status: Resolved Fix version(s): - 1.10.0 (27/Jan/10)

Reporter: Artur Stawiarski (arturio) Assignee: Marc Bennewitz (private) (mabe) Tags: - Zend_Auth

Related issues: Attachments:


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.


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()

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.