Ticket #1800 (closed defect: fixed)

Opened 6 months ago

Last modified 6 months ago

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

Changed 6 months ago by jwage

  • status changed from new to closed
  • resolution set to fixed

(In [5333]) [1.0, 1.1] Makes hydrator exceptions more verbose (closes #1800)

Note: See TracTickets for help on using tickets.