Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
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:
https://wiki.php.net/pear/rfc/pear2_exception_policy
Activity
Marco Pivetta
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Status | Open [ 1 ] | Closed [ 6 ] |
| Assignee | Benjamin Eberlei [ beberlei ] | Marco Pivetta [ ocramius ] |
| Resolution | Duplicate [ 3 ] |
This list may be incomplete, as errors occurred whilst retrieving source from linked applications:
- Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DCOM-105, expand=changesets[-21:-1].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)
Instead of a base class (which forbids extending the SPL exception), I would go the same way than Symfony2 and ZF: using an interface.