Mercurial > hg > orthanc
diff Core/Compression/ZipWriter.cpp @ 3181:6fd38327e777
Fix issue #130 (Orthanc failed to start when /tmp partition was full)
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 31 Jan 2019 15:33:27 +0100 |
parents | 972cc98959a3 |
children | 5d1f5984dc41 |
line wrap: on
line diff
--- a/Core/Compression/ZipWriter.cpp Wed Jan 30 17:50:51 2019 +0100 +++ b/Core/Compression/ZipWriter.cpp Thu Jan 31 15:33:27 2019 +0100 @@ -148,6 +148,7 @@ if (!pimpl_->file_) { + LOG(ERROR) << "Cannot create new ZIP archive: " << path_; throw OrthancException(ErrorCode_CannotWriteFile); } } @@ -169,7 +170,8 @@ if (level >= 10) { throw OrthancException(ErrorCode_ParameterOutOfRange, - "ZIP compression level must be between 0 (no compression) and 9 (highest compression)"); + "ZIP compression level must be between 0 (no compression) " + "and 9 (highest compression)"); } Close(); @@ -208,6 +210,7 @@ if (result != 0) { + LOG(ERROR) << "Cannot add new file inside ZIP archive: " << path; throw OrthancException(ErrorCode_CannotWriteFile); } @@ -239,6 +242,7 @@ if (zipWriteInFileInZip(pimpl_->file_, data, bytes)) { + LOG(ERROR) << "Cannot write data to ZIP archive: " << path_; throw OrthancException(ErrorCode_CannotWriteFile); } @@ -253,6 +257,4 @@ Close(); append_ = append; } - - }