Mercurial > hg > orthanc
comparison Core/DicomNetworking/DicomUserConnection.cpp @ 3798:c38b82bb6fd3
improved error message when trying to C-Move a resource that is not found
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Wed, 01 Apr 2020 10:14:49 +0200 |
parents | 2a170a8f1faf |
children | 320a2d224902 |
comparison
equal
deleted
inserted
replaced
3732:6cd4b7724c3d | 3798:c38b82bb6fd3 |
---|---|
885 if (response.DimseStatus != 0x0000 && // Success | 885 if (response.DimseStatus != 0x0000 && // Success |
886 response.DimseStatus != 0xFF00) // Pending - Sub-operations are continuing | 886 response.DimseStatus != 0xFF00) // Pending - Sub-operations are continuing |
887 { | 887 { |
888 char buf[16]; | 888 char buf[16]; |
889 sprintf(buf, "%04X", response.DimseStatus); | 889 sprintf(buf, "%04X", response.DimseStatus); |
890 throw OrthancException(ErrorCode_NetworkProtocol, | 890 |
891 "C-MOVE SCU to AET \"" + remoteAet_ + | 891 if (response.DimseStatus == STATUS_MOVE_Failed_UnableToProcess) |
892 "\" has failed with DIMSE status 0x" + buf); | 892 { |
893 throw OrthancException(ErrorCode_NetworkProtocol, | |
894 HttpStatus_422_UnprocessableEntity, | |
895 "C-MOVE SCU to AET \"" + remoteAet_ + | |
896 "\" has failed with DIMSE status 0x" + buf + | |
897 " (unable to process - resource not found ?)" | |
898 ); | |
899 } | |
900 else | |
901 { | |
902 throw OrthancException(ErrorCode_NetworkProtocol, | |
903 "C-MOVE SCU to AET \"" + remoteAet_ + | |
904 "\" has failed with DIMSE status 0x" + buf); | |
905 } | |
893 } | 906 } |
894 } | 907 } |
895 | 908 |
896 | 909 |
897 void DicomUserConnection::ResetStorageSOPClasses() | 910 void DicomUserConnection::ResetStorageSOPClasses() |