Subject | Re[2]: [firebird-support] Is using SELECT COUNT (*) in a stored procedure a bad idea? (Once Again) |
---|---|
Author | Nando Dessena |
Post date | 2004-01-27T16:44:57Z |
Alexandre,
ABS> By the way... I don't like to show a message based on text (like you did)
ABS> but the exception number changes on each "drop/create exception" so there
ABS> is no other way... I think will be realy good if FB could store an "error
ABS> number" in the user exception and in FK violations, this error should be
ABS> constant to be incorporated in the client app...
Here's what I usually do
create exception some_exception '[1234] Somethig terrible happened';
and then extract the bracketed error code client side and show a
cleare message depending on context.
Clients that don't do this will see the error messages with the []
stuff included, but that's no big deal for me.
Ciao
--
Nando mailto:nandod@...
ABS> By the way... I don't like to show a message based on text (like you did)
ABS> but the exception number changes on each "drop/create exception" so there
ABS> is no other way... I think will be realy good if FB could store an "error
ABS> number" in the user exception and in FK violations, this error should be
ABS> constant to be incorporated in the client app...
Here's what I usually do
create exception some_exception '[1234] Somethig terrible happened';
and then extract the bracketed error code client side and show a
cleare message depending on context.
Clients that don't do this will see the error messages with the []
stuff included, but that's no big deal for me.
Ciao
--
Nando mailto:nandod@...