comparison 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
comparison
equal deleted inserted replaced
729:948720c72586 730:309e686b41e7
31 31
32 32
33 #include "StoreScp.h" 33 #include "StoreScp.h"
34 34
35 #include "../FromDcmtkBridge.h" 35 #include "../FromDcmtkBridge.h"
36 #include "../ServerToolbox.h"
36 #include "../ToDcmtkBridge.h" 37 #include "../ToDcmtkBridge.h"
37 #include "../../Core/OrthancException.h" 38 #include "../../Core/OrthancException.h"
38 39
39 #include <dcmtk/dcmdata/dcfilefo.h> 40 #include <dcmtk/dcmdata/dcfilefo.h>
40 #include <dcmtk/dcmdata/dcmetinf.h> 41 #include <dcmtk/dcmdata/dcmetinf.h>
55 const char* modality; 56 const char* modality;
56 const char* affectedSOPInstanceUID; 57 const char* affectedSOPInstanceUID;
57 uint32_t messageID; 58 uint32_t messageID;
58 }; 59 };
59 60
60 61
61 static void 62 static void
62 storeScpCallback( 63 storeScpCallback(
63 void *callbackData, 64 void *callbackData,
64 T_DIMSE_StoreProgress *progress, 65 T_DIMSE_StoreProgress *progress,
65 T_DIMSE_C_StoreRQ *req, 66 T_DIMSE_C_StoreRQ *req,
153 cbdata->handler->Handle(buffer, summary, dicomJson, cbdata->distantAET); 154 cbdata->handler->Handle(buffer, summary, dicomJson, cbdata->distantAET);
154 } 155 }
155 catch (OrthancException& e) 156 catch (OrthancException& e)
156 { 157 {
157 rsp->DimseStatus = STATUS_STORE_Refused_OutOfResources; 158 rsp->DimseStatus = STATUS_STORE_Refused_OutOfResources;
158 LOG(ERROR) << "Exception while storing DICOM: " << e.What(); 159
160 if (e.GetErrorCode() == ErrorCode_InexistentTag)
161 {
162 LogMissingRequiredTag(summary);
163 }
164 else
165 {
166 LOG(ERROR) << "Exception while storing DICOM: " << e.What();
167 }
159 } 168 }
160 } 169 }
161 } 170 }
162 } 171 }
163 } 172 }