Ticket #2285 (closed defect: fixed)

Opened 8 months ago

Last modified 7 months ago

Export::exportClassesSql displays incorrect class name on exceptions

Reported by: jeremy Owned by: jwage
Priority: minor Milestone: 1.2.0
Component: Import/Export Version: 1.1.2
Severity: abc Keywords:
Cc: Has Test: no
Status: Pending Core Response Has Patch: no

Description

When an exception is thrown inside of a model class while building the schema, Export::exportClassesSql displays the incorrect class name on line 1263:

throw new Doctrine_Export_Exception("While exporting model class '$name' to SQL: " . $e->getMessage());

This bug can be trivially reproduced by throwing an Exception inside of the setUp method of any model class. The model class displayed by that message will not be the name of the class that threw the exception.

PHP 5.2.6. I'd love to submit a patch except I have no clue why this happens.

Change History

Changed 7 months ago by jwage

  • status changed from new to closed
  • resolution set to fixed
  • milestone changed from 1.1.3 to 1.2.0

Fixed in Doctrine 1.2 by r6128. Now you will get the actual exception that was thrown so you can see the exception and stack trace. No more rethrowing or exception being silenced. Gonna try and remove some more occurrences of things like this in Doctrine 1.2

Note: See TracTickets for help on using tickets.