diff options
author | B. Stack <bgstack15@gmail.com> | 2023-02-21 12:13:36 -0500 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2023-02-21 12:13:36 -0500 |
commit | 5a6ed4e8eadf3af3d141b246f124d67b62a1357c (patch) | |
tree | 4e49ae80efbe181c46110867fe7cf703efd3fcf5 /zen/stream_buffer.h | |
parent | argon2 copyright notice updated (diff) | |
download | FreeFileSync-5a6ed4e8eadf3af3d141b246f124d67b62a1357c.tar.gz FreeFileSync-5a6ed4e8eadf3af3d141b246f124d67b62a1357c.tar.bz2 FreeFileSync-5a6ed4e8eadf3af3d141b246f124d67b62a1357c.zip |
add upstream 12.112.1
Diffstat (limited to 'zen/stream_buffer.h')
-rw-r--r-- | zen/stream_buffer.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zen/stream_buffer.h b/zen/stream_buffer.h index ee9e18fd..64cb76ca 100644 --- a/zen/stream_buffer.h +++ b/zen/stream_buffer.h @@ -149,7 +149,7 @@ private: size_t tryReadImpl(std::unique_lock<std::mutex>& ul, void* buffer, size_t bytesToRead) //throw <write error>; may return short; only 0 means EOF! CONTRACT: bytesToRead > 0! { if (bytesToRead == 0) //"read() with a count of 0 returns zero" => indistinguishable from end of file! => check! - throw std::logic_error("Contract violation! " + std::string(__FILE__) + ':' + numberTo<std::string>(__LINE__)); + throw std::logic_error(std::string(__FILE__) + '[' + numberTo<std::string>(__LINE__) + "] Contract violation!"); assert(isLocked(lockStream_)); assert(!errorRead_); @@ -170,7 +170,7 @@ private: size_t tryWriteWhileImpl(std::unique_lock<std::mutex>& ul, const void* buffer, size_t bytesToWrite) //throw <read error>; may return short! CONTRACT: bytesToWrite > 0 { if (bytesToWrite == 0) - throw std::logic_error("Contract violation! " + std::string(__FILE__) + ':' + numberTo<std::string>(__LINE__)); + throw std::logic_error(std::string(__FILE__) + '[' + numberTo<std::string>(__LINE__) + "] Contract violation!"); assert(isLocked(lockStream_)); assert(!eof_ && !errorWrite_); |