On Tue, August 8, 2006 02:08, Look Forme wrote:
> The problem is that the while doing exception handling
> I have seen that the catch block (for sql_error)
> catches the exception (which is fine) but my process
> also receives a SIGABRT which is not explainable.
If your catch block catches an sql_error and you also get a SIGABRT,
chances are that something goes wrong in your handling of the exception.
Certainly the failure will happen *after* the exception is thrown. It's
hard to say without seeing the minimal example code that produces the
problem, but one thing to watch out for is that generally, you should only
catch *const references* to exceptions, not exception objects:
try
{
foo();
}
catch (const pqxx::sql_error &e)
// *NOT* "catch (pqxx::sql_error e)"!
{
std::cerr << e.what() << std::endl;
}
This avoids certain problems, both in the code itself and, sometimes, in
the compiler.
Of course you may also want to upgrade to libpqxx 2.6.7.
Jeroen
_______________________________________________
Libpqxx-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/libpqxx-general