symfony2admingenerator/AdmingeneratorGeneratorBundle — pull request #247 by loostro (2012-10-17 18:41:56+00:00)
Title: Catch all exceptions on Delete action

Catching all exceptions to display nice flash message "can't delete this object".

Catching only InvalidArgumentException caused symfony2 stack trace (in dev mode)/500 error page (in prod mode) when any other exception was throwed.

In my case I tried to delete some objects with foreign key contrains which caused SQL error.