openzim / libzim

Reference implementation of the ZIM specification
https://download.openzim.org/release/libzim/
GNU General Public License v2.0
166 stars 49 forks source link

(Xapian) Exception mgmt + documentation #870

Closed kelson42 closed 5 months ago

kelson42 commented 6 months ago

We should document coherently which exception might be generated by the libzim. Also if the exceptions don't come from the libzim itself, see https://github.com/kiwix/kiwix-apple/issues/622

kelson42 commented 6 months ago

@mgautierfr Another idea evocated is to transform in addition the Xapian exception in a standard exception which would allow to easily deal with it. How do you think we should proceed?

mgautierfr commented 6 months ago

We should at least catch Xapian::DatabaseCorruptError and rethrow a zim::ZimFileFormatError instead as a corrupted database is kind of corrupted zim file.