Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core firebird if db close connect #760

Open
kireevm96 opened this issue Oct 10, 2019 · 1 comment
Open

Core firebird if db close connect #760

kireevm96 opened this issue Oct 10, 2019 · 1 comment

Comments

@kireevm96
Copy link

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();

}  
@vadz
Copy link
Member

vadz commented Oct 10, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants