Subject | Re: [firebird-support] Exception with a parameter |
---|---|
Author | Martijn Tonies |
Post date | 2004-12-10T11:12:32Z |
Hello Christian,
exception. Can't remember exactly how though :-/
Ah, found it in the "readme" doc of Fb 1.5...
2. EXCEPTION E_EXCEPTION_2 'Wrong type for record with ID=' || new.ID;
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server
Upscene Productions
http://www.upscene.com
> is there a way to add a parameter to an exception whichNope, this cannot be done.
> is displayed in the exception text?
>
> Something like this:
>
> CREATE EXCEPTION E_PA_CM_VERTRAG_NICHT_GEFUNDEN
> 'Contract <Param> was not found.'
> IF (L_Id IS NULL) THENWell, I think you should be able to re-create the message from the
> EXCEPTION E_Pa_Cm_Vertrag_Nicht_Gefunden('434');
>
> This should result in the message
> 'Contract 434 not found.' when the exception is fired.
>
> I am using FB 1.50 and I thought I had heard about parameterized
> exceptions, but I cannot find anything in the release notes.
exception. Can't remember exactly how though :-/
Ah, found it in the "readme" doc of Fb 1.5...
>>1. EXCEPTION E_EXCEPTION_1 'Error!';
2. EXCEPTION E_EXCEPTION_2 'Wrong type for record with ID=' || new.ID;
>>With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server
Upscene Productions
http://www.upscene.com