Subject | REPOST : Handling broken constraints error messages |
---|---|
Author | Jerome Bouvattier |
Post date | 2004-08-24T23:43:49Z |
Hello,
What is the recommended way for turning error messages provided by FB into
something the user can understand ?
For example, if the user attempts to delete a record thus breaking an FK, I
want to tell the user which referencing entity does complain about the
deletion.
So far, I can only think of two possibilities :
1) Do all possibly checks in application code or in SPs to make sure the
deletion will
commit or raise my custom exception.
2) Parse the FB error message for the name of each FK that could possibly be
broken.
Neither is perfect.
Is there anything better I can do ?
Thanks for your advices.
--
Jerome Bouvattier
What is the recommended way for turning error messages provided by FB into
something the user can understand ?
For example, if the user attempts to delete a record thus breaking an FK, I
want to tell the user which referencing entity does complain about the
deletion.
So far, I can only think of two possibilities :
1) Do all possibly checks in application code or in SPs to make sure the
deletion will
commit or raise my custom exception.
2) Parse the FB error message for the name of each FK that could possibly be
broken.
Neither is perfect.
Is there anything better I can do ?
Thanks for your advices.
--
Jerome Bouvattier