LooseCoupling icon indicating copy to clipboard operation
LooseCoupling copied to clipboard

wrong exception class in record filter

Open mahono opened this issue 14 years ago • 0 comments

another problem in Doctrine_Record_Filter_LooselyCoupleable:

when you set an object that was not saved before ($object->exists() == false) the method _findObjectPrimaryKey() throws a Doctrine_Record_Exception. The problem is that Doctrine then rethrows an unknown property "object" exception -- and you sit there and don't understand the world.. ;-)

Don't know.. either change the exception class to just Exception or better do this and also add an exception after line 10 and check if a) the value is a Doctrine_Record and b) if it really exists to make it more reliable.

mahono avatar Jan 18 '11 15:01 mahono