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