Subject Re: [firebird-support] Length of custom exception message.
Author Alexandre Benson Smith
Adam wrote:
> Hello Group,
>
> I have an exception I am raising within a PSQL block, using the 1.5
> feature to replace the static message with a more detailed message.
>
> eg
>
> if (somecondition = 'T') then
> begin
> exception EMyException 'Somecondition was already met';
> end
>
> I also wanted to include some additional details in the exception
> message to make it easier for the user to diagnose and fix.
>
> exception EMyException 'Somecondition was met by ' ||
> OtherEmployeeName || ' on ' || dateofinterest;
>
> What is the maximum length that string can be before it overflows? I
> am happy to make use of substring to guarantee it doesn't, but I don't
> know what to restrict it to.
>
> Thanks
>
> Adam
>
>

Adam,

From FB 2.0 release notes
Size limit for exception messages increased
V. Horsun
Maximum size of exception messages raised from 78 to 1021 bytes.

So 1.5.3 has a limit of 78 bytes.

see you !

--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br