changeset 2936:4b3929668358

create-dicom: more logs in case of error
author am@osimis.io
date Wed, 28 Nov 2018 14:36:09 +0100
parents aeeb40a35ce1
children 1ab59dfd4afc
files OrthancServer/OrthancRestApi/OrthancRestAnonymizeModify.cpp
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi/OrthancRestAnonymizeModify.cpp	Wed Nov 28 14:34:56 2018 +0100
+++ b/OrthancServer/OrthancRestApi/OrthancRestAnonymizeModify.cpp	Wed Nov 28 14:36:09 2018 +0100
@@ -271,6 +271,7 @@
   {
     if (tags.type() != Json::objectValue)
     {
+      LOG(ERROR) << "Tags field is not an array";
       throw OrthancException(ErrorCode_BadRequest);
     }
 
@@ -296,11 +297,13 @@
             tag != DICOM_TAG_STUDY_TIME &&
             dicom.HasTag(tag))
         {
+          LOG(ERROR) << EnumerationToString(ErrorCode_CreateDicomOverrideTag) << ": " << name;
           throw OrthancException(ErrorCode_CreateDicomOverrideTag);
         }
 
         if (tag == DICOM_TAG_PIXEL_DATA)
         {
+          LOG(ERROR) << EnumerationToString(ErrorCode_CreateDicomUseContent);
           throw OrthancException(ErrorCode_CreateDicomUseContent);
         }
         else