Ticket #1800 (closed defect: fixed)
Make Hydrator exceptions more verbose
| Reported by: | jwage | Owned by: | jwage |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.0.6 |
| Component: | Query/Hydration | Version: | 1.0.4 |
| Severity: | Keywords: | ||
| Cc: | Has Test: | no | |
| Status: | Pending Core Response | Has Patch: | no |
Description
In the Hydrator class, some exceptions can be thrown with text along the lines of "Couldn't hydrate. Found a non-existent key."
It would be more useful to the end user to make these more verbose, for example by changing
throw new Doctrine_Hydrator_Exception("Couldn't hydrate. Found a non-existent key.");
to
throw new Doctrine_Hydrator_Exception("Couldn't hydrate. Found a non-existent key called '$field'.");
There are at least four instances in this file where I think this would help (lines 144, 146, 210 and 212). However, please sanity-check that this makes sense since you know the Doctrine code base far better than I!
C
Change History
Note: See
TracTickets for help on using
tickets.