diff OrthancServer/Internals/StoreScp.cpp @ 730:309e686b41e7

better logging about nonexistent tags
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 25 Feb 2014 14:51:19 +0100
parents 2d0a347e8cfc
children 0a2f8c707c78
line wrap: on
line diff
--- a/OrthancServer/Internals/StoreScp.cpp	Mon Feb 24 13:50:40 2014 +0100
+++ b/OrthancServer/Internals/StoreScp.cpp	Tue Feb 25 14:51:19 2014 +0100
@@ -33,6 +33,7 @@
 #include "StoreScp.h"
 
 #include "../FromDcmtkBridge.h"
+#include "../ServerToolbox.h"
 #include "../ToDcmtkBridge.h"
 #include "../../Core/OrthancException.h"
 
@@ -57,7 +58,7 @@
       uint32_t messageID;
     };
 
-
+    
     static void
     storeScpCallback(
       void *callbackData,
@@ -155,7 +156,15 @@
               catch (OrthancException& e)
               {
                 rsp->DimseStatus = STATUS_STORE_Refused_OutOfResources;
-                LOG(ERROR) << "Exception while storing DICOM: " << e.What();
+
+                if (e.GetErrorCode() == ErrorCode_InexistentTag)
+                {
+                  LogMissingRequiredTag(summary);
+                }
+                else
+                {
+                  LOG(ERROR) << "Exception while storing DICOM: " << e.What();
+                }
               }
             }
           }