Mercurial > hg > orthanc-transfers
diff Framework/DownloadArea.cpp @ 40:1256194e1c08
sync orthanc + sdk 1.5.0 + added more info in error logs
author | Alain Mazy <am@osimis.io> |
---|---|
date | Tue, 12 Jul 2022 12:43:43 +0200 |
parents | 44a0430d7899 |
children | 1e396fb509ca |
line wrap: on
line diff
--- a/Framework/DownloadArea.cpp Wed Jun 22 17:32:00 2022 +0200 +++ b/Framework/DownloadArea.cpp Tue Jul 12 12:43:43 2022 +0200 @@ -55,7 +55,7 @@ if (!stream_.good()) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_CannotWriteFile); + throw Orthanc::OrthancException(Orthanc::ErrorCode_CannotWriteFile, std::string("Unable to write to ") + f.GetPath()); } } @@ -88,7 +88,7 @@ { if (offset + size > info_.GetSize()) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); + throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange, "WriteChunk out of bounds"); } else if (size > 0) { @@ -151,7 +151,7 @@ if (it == instances_.end()) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_UnknownResource); + throw Orthanc::OrthancException(Orthanc::ErrorCode_UnknownResource, "Unknown instance"); } else if (it->first != id || it->second == NULL) @@ -171,7 +171,8 @@ { if (size != bucket.GetTotalSize()) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_NetworkProtocol); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NetworkProtocol, + "WriteUncompressedBucket: " + boost::lexical_cast<std::string>(size) + " != " + boost::lexical_cast<std::string>(bucket.GetTotalSize())); } if (size == 0)