Implementation helper that closes the stream if a method exits by throwing an exception. More...
#include <tpie/compressed/stream.h>
Public Member Functions | |
close_on_fail_guard (compressed_stream_base *s) | |
void | commit () |
Implementation helper that closes the stream if a method exits by throwing an exception.
At every proper exit point from the method, commit() must be called. If the method exits without committing, close() is called. Care should be taken to ensure that the compressor lock is not held when this object is destructed!