Mercurial > hg > orthanc-databases
comparison Framework/Plugins/DatabaseBackendAdapterV4.cpp @ 445:cec6a0cd399f pg-transactions
now logging DatabaseCannotSerialize as a warning only with the details (Orthanc will log it as an error after all retries)
author | Alain Mazy <am@osimis.io> |
---|---|
date | Wed, 10 Jan 2024 15:25:03 +0100 |
parents | f16faa1fdc46 |
children | 5881e4af5799 |
comparison
equal
deleted
inserted
replaced
444:2ca939d02d39 | 445:cec6a0cd399f |
---|---|
1348 | 1348 |
1349 return OrthancPluginErrorCode_Success; | 1349 return OrthancPluginErrorCode_Success; |
1350 } | 1350 } |
1351 catch (::Orthanc::OrthancException& e) | 1351 catch (::Orthanc::OrthancException& e) |
1352 { | 1352 { |
1353 LOG(ERROR) << "Exception in database back-end: " << e.What(); | 1353 if (e.GetErrorCode() == ::Orthanc::ErrorCode_DatabaseCannotSerialize) |
1354 { | |
1355 LOG(WARNING) << "An SQL transaction failed and will likely be retried: " << e.GetDetails(); | |
1356 } | |
1357 else | |
1358 { | |
1359 LOG(ERROR) << "Exception in database back-end: " << e.What(); | |
1360 } | |
1354 return static_cast<OrthancPluginErrorCode>(e.GetErrorCode()); | 1361 return static_cast<OrthancPluginErrorCode>(e.GetErrorCode()); |
1355 } | 1362 } |
1356 catch (::std::runtime_error& e) | 1363 catch (::std::runtime_error& e) |
1357 { | 1364 { |
1358 LOG(ERROR) << "Exception in database back-end: " << e.what(); | 1365 LOG(ERROR) << "Exception in database back-end: " << e.what(); |