[fdo-dev] Catching exceptions in FDORDBMS Unit Tests

Mateusz Loskot mateusz at loskot.net
Fri Sep 8 23:39:48 EDT 2006


Romica Dascalescu wrote:
> Mateusz,
> 
> Rebuild your unit test
> I have changed
> Providers/GenericRdbms/Src\UnitTest\Common\ConnectionUtil.cpp
> I removed "timeout=7" from connection string
> ConnectionUtil::GetConnectionString.
> Now timeout become an invalid connection property.

Romica,

I'm not sure I understand your message above.
Does it mean 'timeout' value may influence exceptions handling
behavior in some way?

I cleaned my sandbox and did fresh updated.
Next, I did complete rebuild of FDORDBMS with Unit Tests,
but the UnitTestMySql still terminates with following message:

----- command line -----
mloskot:~/dev/fdo/_svn/Providers/GenericRdbms/Src/UnitTest$
./UnitTestMySql initfiletest=mysql-mloskot-init.txt
Test ID: 16315079
.F.F.F.F.F.F.F.F.F.F.F..F.F.F.Test is in group 'rollback', skipping test
.Initializing Connection ...
terminate called after throwing an instance of 'FdoException*'
Aborted
----- command line -----


So, I'd like to point on following two issues:

1. Missing try-catch in the main(). I think it is worth to wrap main()
with try-catch. [***]

2. Does the CppUnit influences C++ exceptions in any way? May be
it sets custom unexpected exception handler function?


[***] I added try-catch clause but the problem still occurs and
 ./UnitTestMySql program terminates on throw.
I'm not sure, but may be there is something wrong with FDO / FDORDBMS
compilation, for example static libraries are build without -static
option, shared libraries -shared (to make exceptions working across
shared lib boundaries, etc.).

I've not investigated it deeply yet and I decided to consult here first.

Cheers
-- 
Mateusz Loskot
http://mateusz.loskot.net





More information about the Fdo-internals mailing list