How to catch an error if the connection is closed?
Error in manual update: connection shutdown
db_soci_error: connection shutdown
terminate called after throwing an instance of 'soci::firebird_soci_error'
what(): connection shutdown
Aborted (core dumped)
Catching the exception should definitely work and seemingly does. It's not clear why does your program crash, please try debugging it or, at the very least, reproduce the issue in the SOCI test suite.
How to catch an error if the connection is closed?
Error in manual update: connection shutdown db_soci_error: connection shutdown terminate called after throwing an instance of 'soci::firebird_soci_error' what(): connection shutdown Aborted (core dumped)
Try { ... } catch (firebird_soci_error const &e)
{
_CLOGERR(OIMPORT) << "db_soci_error: " << e.what(); }
catch (soci::soci_error const &e)
{
_CLOGERR(OIMPORT) << "soci_error: " << e.what();