[odb-users] ODB exception problem
cetoni GmbH - Uwe Kindler
uwe.kindler at cetoni.de
Thu Jun 16 03:33:24 EDT 2011
Hi Boris,
first I built libodb and the examples with the default settings. I
simply modified some lines in the embedded driver.cxx but did not modify
a makefiles or linker options:
{
//transaction t (db->begin ());
schema_catalog::create_schema (*db);
//t.commit ();
}
Because create_schema needs a transaction this code now throws an
exception. When I ran the example, it crashed and never reached the lines.
catch (const odb::exception& e)
{
cerr << e.what () << endl;
return 1;
}
Both the examples and libodb was buit with the default makefiles (with
libtool). So there was no mixing of different exception handling mechanisms.
Then I added the -shared-libgcc and -shared-libstdc++ options to the
libodb and to the examples build and rebuilt everything. After this
change the exception was properly catched in the embedded example.
Kind regards,
Uwe Kindler
Dipl. Inf. (FH)
Software Engineering
cetoni GmbH
Automatisierung und Mikrosysteme
Am Wiesenring 6
D-07554 Korbussen
Phone: +49 (0) 36602 338 28
Fax: +49 (0) 36602 338 11
Email: uwe.kindler at cetoni.de
Web: http://www.cetoni.de
Handelsregister Jena HRB 202566
Ust.-Ident-Nr. DE 1505 26212
Geschäftsführer:
Tilo Kunze
More information about the odb-users
mailing list