Subject | Re: [IBO] Why IBO limits exception text length to 255 chars? |
---|---|
Author | Hans |
Post date | 2008-09-12T16:03:22Z |
By default IBO treats strings with a length of up to 255 chars as a ftString
and anything longer as a ftMemo. (See source of IB_Session). I wonder
if the limitation here is still a residue from before the introduction of
the
global variable 'MaximumStringSize'
and anything longer as a ftMemo. (See source of IB_Session). I wonder
if the limitation here is still a residue from before the introduction of
the
global variable 'MaximumStringSize'
----- Original Message -----
From: "Carlos H. Cantu" <listas@...>
To: <IBObjects@yahoogroups.com>
Sent: Friday, September 12, 2008 7:43 AM
Subject: [IBO] Why IBO limits exception text length to 255 chars?
> Many times, I get truncated (cut) exception messages with IBO. This is
> terrible to debug errors happening in "outside" customers, since the
> reported error message will not contain the full information about the
> error.
>
> Doing some debug, I found the following code in IBODataset unit:
>
> constructor EIBO_ISCError.CreateISC( Sender: TObject;
> MessageText: string;
> AERRCODE: longint;
> AErrorMessage: TStringList;
> AErrorCodes: TStringList;
> ASQLCODE: longint;
> ASQLMessage: TStringList;
> ASQL: TStringList );
> var
> tmpTxt: string;
> begin
> tmpTxt := MessageText;
> if Length( tmpTxt ) > 255 then <================= WHY???
> SetLength( tmpTxt, 255 );
> inherited Create( tmpTxt );
> FSender := Sender;
> FERRCODE := AERRCODE;
> FErrorMessage := TStringList.Create;
> FErrorCodes := TStringList.Create;
> FSQLCODE := ASQLCODE;
> FSQLMessage := TStringList.Create;
> FSQL := TStringList.Create;
> FErrorMessage.Assign( AErrorMessage );
> FErrorCodes.Assign( AErrorCodes );
> FsqlMessage.Assign( AsqlMessage );
> Fsql.Assign( Asql );
> end;
>
> Question is: Why IBO restrict the message length to 255 chars? I
> commented that IF and the full messages were show, so I guess there is
> no problem in raising exceptions with big messages.
>
> Can anyone explain this?
>
> []s
> Cantu
> http://www.firebirdnews.org
> FireBase - http://www.FireBase.com.br
>
>
> ------------------------------------
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or
> InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info
> papers,
> keyword-searchable FAQ, community code contributions and more !
> Yahoo! Groups Links
>
>
>