changeset 2431:14537babc1e6

print error if unable to parse DICOM
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 30 Oct 2017 09:48:32 +0100
parents a6fab385b89e
children 5a650eef0794
files Core/DicomParsing/FromDcmtkBridge.cpp
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Core/DicomParsing/FromDcmtkBridge.cpp	Sun Oct 29 17:38:55 2017 +0100
+++ b/Core/DicomParsing/FromDcmtkBridge.cpp	Mon Oct 30 09:48:32 2017 +0100
@@ -1906,6 +1906,7 @@
     result->transferInit();
     if (!result->read(is).good())
     {
+      LOG(ERROR) << "Cannot parse an invalid DICOM file (size: " << size << " bytes)";
       throw OrthancException(ErrorCode_BadFileFormat);
     }