Zend Framework

Encapsulating exceptions bad for developer

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: N/A N/A
  • Resolution: Fixed
  • Affects Version/s: 1.8.0
  • Fix Version/s: 1.10.0
  • Component/s: Zend_Auth
  • Labels:
    None

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.

Activity

Hide
Matthew Weier O'Phinney added a comment -

Assigning to Ralph

Show
Matthew Weier O'Phinney added a comment - Assigning to Ralph
Hide
Marc Bennewitz (private) added a comment -

Within ZF 1.10 the thrown exception contains the previous exception.
To display it simply print the exception or call $exception->getPrevious()

Show
Marc Bennewitz (private) added a comment - Within ZF 1.10 the thrown exception contains the previous exception. To display it simply print the exception or call $exception->getPrevious()

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: