BUG: truncated error message when throwing (fixes #3201)

- only affected v2406. Root cause is #3281
This commit is contained in:
Mark Olesen 2024-12-12 13:02:59 +01:00
parent a797ac8193
commit 0a363f2885

View File

@ -157,7 +157,10 @@ Foam::error::error(const error& err)
throwing_(err.throwing_),
messageStreamPtr_(nullptr)
{
if (err.messageStreamPtr_ && (err.messageStreamPtr_->count() > 0))
// FIXME: OStringStream copy construct does not adjust tellp and
// thus the count is wrong! (#3281)
// // if (err.messageStreamPtr_ && (err.messageStreamPtr_->count() > 0))
if (err.messageStreamPtr_)
{
messageStreamPtr_.reset(new OStringStream(*err.messageStreamPtr_));
}