Hi,

I'm getting the error

SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or
update a parent row: a foreign key constraint fails

when I delete a parent row from my admin generator. That's fine; it's
doing what it should be doing; however I want to display a nicer error
message for just this error along the lines of "You can't delete x
because it has y linked to it".

Currently it just goes to the standard symfony error500 page; I don't
want to just override the 500 error page with this message, because if
the server ever gives error500s for other reasons it could potentially
be confusing.

How can I display a custom error for "Integrity constraint violation"
and leave my 500 page intact.

...or.. is there another way to achieve what I'm trying to do?

Symfony 1.4, Doctrine, Mysql

thanks!!

Brett

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

To unsubscribe from this group, send email to 
symfony-users+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to