Update error messages

This commit is contained in:
topjohnwu
2022-02-11 00:01:42 -08:00
parent 8edf556c9e
commit 93eb277a88
2 changed files with 8 additions and 2 deletions

View File

@@ -438,7 +438,11 @@ public:
~LZ4F_encoder() override {
size_t len = LZ4F_compressEnd(ctx, out_buf, outCapacity, nullptr);
bwrite(out_buf, len);
if (LZ4F_isError(len)) {
LOGE("LZ4F end of frame error: %s\n", LZ4F_getErrorName(len));
} else if (!bwrite(out_buf, len)) {
LOGE("LZ4F end of frame error: I/O error\n");
}
LZ4F_freeCompressionContext(ctx);
delete[] out_buf;
}