Changeset: 9bafc43b9a6b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9bafc43b9a6b Modified Files: common/stream/bz2_stream.c common/stream/gz_stream.c common/stream/lz4_stream.c common/stream/xz_stream.c Branch: octbugs Log Message:
Make sure stream error is set when compressed stream fails diffs (44 lines): diff --git a/common/stream/bz2_stream.c b/common/stream/bz2_stream.c --- a/common/stream/bz2_stream.c +++ b/common/stream/bz2_stream.c @@ -137,6 +137,7 @@ bz2_stream(stream *inner, int level) if (bz == NULL || state == NULL) { free(bz); free(state); + mnstr_set_open_error(inner->name, errno, "couldn't initialize bz2 stream"); return NULL; } diff --git a/common/stream/gz_stream.c b/common/stream/gz_stream.c --- a/common/stream/gz_stream.c +++ b/common/stream/gz_stream.c @@ -115,6 +115,7 @@ gz_stream(stream *inner, int level) if (gz == NULL || state == NULL) { free(gz); free(state); + mnstr_set_open_error(inner->name, errno, "couldn't initialize gz stream"); return NULL; } diff --git a/common/stream/lz4_stream.c b/common/stream/lz4_stream.c --- a/common/stream/lz4_stream.c +++ b/common/stream/lz4_stream.c @@ -277,6 +277,7 @@ lz4_stream(stream *inner, int level) if (inner_state == NULL || state == NULL) { free(inner_state); free(state); + mnstr_set_open_error(inner->name, errno, "couldn't initialize lz4 stream"); return NULL; } diff --git a/common/stream/xz_stream.c b/common/stream/xz_stream.c --- a/common/stream/xz_stream.c +++ b/common/stream/xz_stream.c @@ -115,6 +115,7 @@ xz_stream(stream *inner, int preset) if (xz == NULL || state == NULL) { free(xz); free(state); + mnstr_set_open_error(inner->name, errno, "couldn't initialize xz stream"); return NULL; } _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list