Mercurial > hg > orthanc
comparison Core/DicomParsing/FromDcmtkBridge.cpp @ 3895:37cf1889667a transcoding
more explicit error message
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Thu, 07 May 2020 11:31:58 +0200 |
parents | 890af7156f19 |
children | 210af28c4087 |
comparison
equal
deleted
inserted
replaced
3870:09798f2b985f | 3895:37cf1889667a |
---|---|
1723 case Json::arrayValue: | 1723 case Json::arrayValue: |
1724 { | 1724 { |
1725 DcmTag key(tag.GetGroup(), tag.GetElement()); | 1725 DcmTag key(tag.GetGroup(), tag.GetElement()); |
1726 if (key.getEVR() != EVR_SQ) | 1726 if (key.getEVR() != EVR_SQ) |
1727 { | 1727 { |
1728 throw OrthancException(ErrorCode_BadParameterType); | 1728 throw OrthancException(ErrorCode_BadParameterType, "Bad Parameter type for tag " + tag.Format()); |
1729 } | 1729 } |
1730 | 1730 |
1731 DcmSequenceOfItems* sequence = new DcmSequenceOfItems(key); | 1731 DcmSequenceOfItems* sequence = new DcmSequenceOfItems(key); |
1732 element.reset(sequence); | 1732 element.reset(sequence); |
1733 | 1733 |
1767 | 1767 |
1768 break; | 1768 break; |
1769 } | 1769 } |
1770 | 1770 |
1771 default: | 1771 default: |
1772 throw OrthancException(ErrorCode_BadParameterType); | 1772 throw OrthancException(ErrorCode_BadParameterType, "Bad Parameter type for tag " + tag.Format()); |
1773 } | 1773 } |
1774 | 1774 |
1775 return element.release(); | 1775 return element.release(); |
1776 } | 1776 } |
1777 | 1777 |