comparison Core/DicomNetworking/DicomUserConnection.cpp @ 3800:38b0f51781aa

improved error message when trying to execute a C-Find query that is not accepted by the remote modality
author Alain Mazy <alain@mazy.be>
date Wed, 01 Apr 2020 11:08:43 +0200
parents 320a2d224902
children 7f083dfae62b
comparison
equal deleted inserted replaced
3799:320a2d224902 3800:38b0f51781aa
734 response.DimseStatus != 0xFF00 && // Pending - Matches are continuing 734 response.DimseStatus != 0xFF00 && // Pending - Matches are continuing
735 response.DimseStatus != 0xFF01) // Pending - Matches are continuing 735 response.DimseStatus != 0xFF01) // Pending - Matches are continuing
736 { 736 {
737 char buf[16]; 737 char buf[16];
738 sprintf(buf, "%04X", response.DimseStatus); 738 sprintf(buf, "%04X", response.DimseStatus);
739 throw OrthancException(ErrorCode_NetworkProtocol, 739
740 "C-FIND SCU to AET \"" + remoteAet + 740 if (response.DimseStatus == STATUS_FIND_Failed_UnableToProcess)
741 "\" has failed with DIMSE status 0x" + buf); 741 {
742 throw OrthancException(ErrorCode_NetworkProtocol,
743 HttpStatus_422_UnprocessableEntity,
744 "C-FIND SCU to AET \"" + remoteAet +
745 "\" has failed with DIMSE status 0x" + buf +
746 " (unable to process - invalid query ?)"
747 );
748 }
749 else
750 {
751 throw OrthancException(ErrorCode_NetworkProtocol,
752 "C-FIND SCU to AET \"" + remoteAet +
753 "\" has failed with DIMSE status 0x" + buf);
754 }
742 } 755 }
743 756
744 } 757 }
745 758
746 759