>but I can't figure out what kind of error the delete is returning now. So I
>can show a decend message to my users when they are trying to delete a
>relation.
>
>Someone an idea, maybe there is already somewhere/someone who builded code
>to do the error followup?
This type of error should always contain the following pattern.
The error code "SQLSTATE[23000]", this is SQL standard error code for an
integrity constraint violation.
Also possibly the text pattern "integrity constraint violation", while you
would expect this and in fact PDO does include this text pattern in its error
messages of this type; the SQL standard doesn't provide for the text content
of the error messages, only the sqlstate type error codes.
You should check with your rdbms vendor documentation to be sure.
Graham
没有评论:
发表评论