Mercurial > hg > orthanc-databases
comparison Framework/PostgreSQL/PostgreSQLStatement.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 | dbf811b1bb43 |
children | f0976163dbe1 |
comparison
equal
deleted
inserted
replaced
444:2ca939d02d39 | 445:cec6a0cd399f |
---|---|
285 { | 285 { |
286 PQclear(result); | 286 PQclear(result); |
287 } | 287 } |
288 | 288 |
289 #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 9, 2) | 289 #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 9, 2) |
290 throw Orthanc::OrthancException(Orthanc::ErrorCode_DatabaseCannotSerialize); | 290 std::string errorString(PQresultErrorMessage(result)); |
291 throw Orthanc::OrthancException(Orthanc::ErrorCode_DatabaseCannotSerialize, errorString, false); // don't log here, it is handled at higher level | |
291 #else | 292 #else |
292 throw Orthanc::OrthancException(Orthanc::ErrorCode_Database, "Collision between multiple writers"); | 293 throw Orthanc::OrthancException(Orthanc::ErrorCode_Database, "Collision between multiple writers"); |
293 #endif | 294 #endif |
294 } | 295 } |
295 else if (result == NULL) | 296 else if (result == NULL) |