Treat uncaught exception in destructor properly.
@@ -35,8 +35,10 @@ struct TCtrDataStreamWriter {
}
}
~TCtrDataStreamWriter() {
+ if (!std::uncaught_exception()) {
Y_VERIFY(WritesCount == ExpectedWritesCount);
}
+ }
private:
IOutputStream* StreamPtr = nullptr;
TMutex StreamLock;
