Hi all,

I have posted this to firebird-support and there was no reply ... so I
repost it here.
The problem is that in Delphi some runtime exceptions are not catched with
2.5 client ... with every other older FB client everything is OK.
More in original post....

Thank you for help.

Best regards,
Simon



--------

I have a Delphi database application that is currently running on FB 2.5
server.
Application was working OK for several years on previous FB versions. I
switched
to FB 2.5 early when it was released.

This year I noticed a couple of cases when there was INF value written in
double
precision field in database. I also noticed, that Delphi Try / Except / End
block was not catching EZeroDivide etc. exceptions ... this is big problem.
Imagine case like this:

var
A,B,C: Real;

try
C := A / B; // B is zero here
except
C := 0;
end

Exception is not raised on C calculation and C is calculated as INF.
Well I can change that and check if B is zero and do workaround, but there
is
Delphi VCL that depends on exception being raised!
That is why Delphi sets FPU Control Word to $1332 to raise exceptions.
You can read more about that here:
http://qc.embarcadero.com/wc/qcmain.aspx?d=5928

So, when I was looking for DLL that my application loads that disables FPU
exceptions I realised that it is Firebird Client library or its MSVC RTL.

What I found out is that my delphi application is catching exceptions if I
use
FB client from version 1.5 up to version 2.1.4, but not with FB 2.5 client.

Now I wonder if it is FB Client that is builded with disabled FPU exceptions
catching or is it MSVC RTL. I dont know if MSVC RTL changed from FB 2.1.4 to
FB
2.5 or it is the same.

If I set FPU CW to $1332 manualy in my application it works only for a
couple of
lines of code than it is back disabled again, so this is not a solution.
Currently I am using 2.1.4 client to be on the safe side.

Does anybody knows what changed in FB 2.5 and what can be done about it?


Thank you and best regards,

Simon

--
View this message in context: 
http://firebird.1100200.n4.nabble.com/FW-Delphi-application-and-Firebird-2-5-client-tp3887344p3887344.html
Sent from the firebird-devel mailing list archive at Nabble.com.

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to