class LibZip::Error
Base class for anything this gem fails with, and a StandardError, so a single +rescue LibZip::Error+ handles all of them.
begin LibZip::File.open("archive.zip") { |zip| zip.read("nope.txt") } rescue LibZip::NotFoundError => e warn "missing entry: #{e.message}" rescue LibZip::Error => e warn "libzip error: #{e.message}" end
Each libzip error code maps to one of the subclasses below; a code with no better home comes back as LibZip::Error.