pub enum IntegrityErr {
Other(ReadWriteError),
Corruption(u64, ComponentTag),
InvalidBlockStructure {
start_of_bad_component: u64,
},
FileConfigMisMatch,
}Variants§
Other(ReadWriteError)
Corruption(u64, ComponentTag)
This only returns if a Component Header (or hash) is corrupted. We cannot process the file any farther. We only read Front to Back so the position is all the farther we checked the file. The file may still be able to succeed at tail recovery if this corruption is earlier than the second to last block. If found in the last block, then a tail recovery would truncate this block. Integrity check handles the last block, so if you have this error then somehow part of the file got corrupted, badly.
InvalidBlockStructure
This is really an implementation error, where we find the wrong ‘pattern’ of headers. This should only occur in testing ideally.
FileConfigMisMatch
Either the MAGIC_NUMBER, the V1 tag, or the ECC_LEN don’t match this compiled program. Most likely would happen if you upgraded or have multiple docufort wrappers that use a different ECC_LEN You should only open docufort files that were written with the current compiled software.