Skip to content
This repository
Browse code

Add logger messages if database operation fails

  • Loading branch information...
commit 3d69e2ab2c80218025278c6df2fbf6adce1c0267 1 parent 0984ce5
Steve Pieper pieper authored

Showing 1 changed file with 7 additions and 0 deletions. Show diff stats Hide diff stats

  1. +7 0 Libs/DICOM/Core/ctkDICOMDatabase.cpp
7 Libs/DICOM/Core/ctkDICOMDatabase.cpp
@@ -832,6 +832,13 @@ bool ctkDICOMDatabase::removeSeries(const QString& seriesInstanceUID)
832 832 fileRemove.prepare("DELETE FROM Images WHERE SeriesInstanceUID == ?");
833 833 fileRemove.bindValue(0,seriesInstanceUID);
834 834 fileRemove.exec();
  835 + success = fileRemove.exec();
  836 + logger.error("SQLITE: removing seriesInstanceUID " + seriesInstanceUID);
  837 + if (!success)
  838 + {
  839 + logger.error("SQLITE ERROR: could not remove seriesInstanceUID " + seriesInstanceUID);
  840 + logger.error("SQLITE ERROR: " + fileRemove.lastError().driverText());
  841 + }
835 842
836 843 QPair<QString,QString> fileToRemove;
837 844 foreach (fileToRemove, removeList)

0 comments on commit 3d69e2a

Please sign in to comment.
Something went wrong with that request. Please try again.