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/serialize.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/serialize.h')
-rw-r--r-- | zen/serialize.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/zen/serialize.h b/zen/serialize.h index a996b118..8ccecd53 100644 --- a/zen/serialize.h +++ b/zen/serialize.h @@ -256,7 +256,7 @@ BinContainer unbufferedLoad(Function tryRead /*(void* buffer, size_t bytesToRead { static_assert(sizeof(typename BinContainer::value_type) == 1); //expect: bytes if (blockSize == 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!"); BinContainer buf; for (;;) @@ -285,7 +285,7 @@ void unbufferedSave(const BinContainer& cont, { static_assert(sizeof(typename BinContainer::value_type) == 1); //expect: bytes if (blockSize == 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!"); const size_t bufPosEnd = cont.size(); size_t bufPos = 0; @@ -311,7 +311,7 @@ void unbufferedStreamCopy(Function1 tryRead /*(void* buffer, size_t bytesToRead) blockSizeOut = std::bit_ceil(blockSizeOut); #endif if (blockSizeIn == 0 || blockSizeOut == 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!"); const size_t bufCapacity = blockSizeOut - 1 + blockSizeIn; const size_t alignment = ::sysconf(_SC_PAGESIZE); //-1 on error => posix_memalign() will fail |