Permalink
Browse files

Add logger messages if database operation fails

  • Loading branch information...
1 parent 0984ce5 commit 3d69e2ab2c80218025278c6df2fbf6adce1c0267 @pieper pieper committed Mar 26, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 Libs/DICOM/Core/ctkDICOMDatabase.cpp
View
7 Libs/DICOM/Core/ctkDICOMDatabase.cpp
@@ -832,6 +832,13 @@ bool ctkDICOMDatabase::removeSeries(const QString& seriesInstanceUID)
fileRemove.prepare("DELETE FROM Images WHERE SeriesInstanceUID == ?");
fileRemove.bindValue(0,seriesInstanceUID);
fileRemove.exec();
+ success = fileRemove.exec();
+ logger.error("SQLITE: removing seriesInstanceUID " + seriesInstanceUID);
+ if (!success)
+ {
+ logger.error("SQLITE ERROR: could not remove seriesInstanceUID " + seriesInstanceUID);
+ logger.error("SQLITE ERROR: " + fileRemove.lastError().driverText());
+ }
QPair<QString,QString> fileToRemove;
foreach (fileToRemove, removeList)

0 comments on commit 3d69e2a

Please sign in to comment.