Subject Re: [firebird-support] How To raise system exception, or set gds/sql code to custom value
Author Helen Borrie
At 03:53 PM 27/09/2005 +0300, you wrote:
>Hi,
> Is there possible to raise system exception in my own trigger , or
>to set gds/sql code to custom value ?.
> I need to raise system exception manually (unique_key_violation) .
> As far as I understand it is enough to set gds/sql code to custom value.
> I Tried various cases (set gdscode=..,sqlcode=..), but couldnt get
>results.

create exception My_Unique_Key_Violation 'This is a custom exception
message 78 bytes or less';


.....
WHEN GDSCODE unique_key_violation do
begin
whatever;
exception My_Unique_Key_Violation;
end
....

Is that what you are after?

./heLen