[Doctrine_Parser_Exception] Fail-some error message!

doctrine
If your precious evening hacking time has been wasted by this useless error message:

rp@devbox:trunk$ php symfony --trace doctrine:build-all-reload --no-confirmation
>> doctrine  dropping databases
>> doctrine  Successfully dropped database f...octrine" named "secret_project"
>> doctrine  creating databases
>> doctrine  Successfully created database f...octrine" named "secret_project"
>> doctrine  generating model classes

                                                    
  [Doctrine_Parser_Exception]                       
  Unable to parse string: Unable to parse line 0 (  
                                                    

Exception trace:
  at ...
....

Then look no further, this was the oddest error message which caused errors inconsistently when generating models or updating the schema files. It turned out that the error was due to

  • vim swap files
  • osx ._ files

The parser would pick up all the files even if it started with a . (dot) which then borks of-course coz it wasn’t in the format it would expect it to be in

What would have been useful would be to have more meaningful error message like full path+file name and also the parser shouldnt pickup . (dot) files in the first place, dont see why a developer would want to keep his config files starting with a . (dot) unless its a .htaccess file.

About rp

Architect for large, highly scalable LAMP applications and Technical Manager with special focus on metrics based continuous improvement of teams and products. Rajat has close to a decade of experience of a very wide range of skills related to infrastructure, middleware, app servers all the way to front-end technologies and software development methodologies including agile, iterative waterfall, waterfall as well as ah-hoc startup using the right approach in the right context to reduce time to market.