Closed HedvigS closed 5 months ago
Hello, I've added the file name to relevant warnings and errors. You can test it like this:
library(qs)
# Print file name on checksum error
x <- qserialize(1, preset = "uncompressed")
x[length(x)] <- as.raw(255)
writeBin(x, con = "/tmp/temp.qs")
qread("/tmp/temp.qs")
# Warning: In file /tmp/temp.qs: Hash checksum does not match (Recorded, Computed) (4292153937,47518289), data may be corrupted
# print filename for missing file
qread("file_does_not_exist.qs")
# For file file_does_not_exist.qs: Failed to open for reading...
Hopefully will be on CRAN soon
Lovely! Thank you @traversc !
I use qs functions to read in many files in loop/apply/map_df. It would be beneficial if warnings (like the checksum checks) also reported the file where the breakage happened, even if it's "just" a warning and not a full error.