symfony2admingenerator/AdmingeneratorGeneratorBundle — pull request #248 by loostro (2012-10-17 21:39:59+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.