[DCOM-105] Common base exception class Created: 27/Aug/12  Updated: 21/Feb/13  Resolved: 21/Feb/13

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None
Security Level: All

Type: Improvement Priority: Major
Reporter: Till Assignee: Marco Pivetta
Resolution: Duplicate Votes: 0
Labels: None


Per our discussion on IRC/Twitter.

It would be nice if all exceptions thrown had a common base, so something like this is possible to catch all exceptions from Doctrine:

try {
    // some code here
} catch (\Doctrine\Common\BaseException $e) {
    // something in Doctrine threw an exception, handle it here

(The name is just an example.)

For reference:

Comment by Christophe Coevoet [ 27/Aug/12 ]

Instead of a base class (which forbids extending the SPL exception), I would go the same way than Symfony2 and ZF: using an interface.

Comment by Till [ 27/Aug/12 ]

That's basically what the PEAR2 RFC is doing.

Comment by Marco Pivetta [ 21/Feb/13 ]

Duplicate of DCOM-80

Generated at Sat Aug 29 15:02:17 EDT 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.