RubyZip Exceptions


I am wondering if there is a way of catching exceptions that are
thrown within rubyzip.rb.

For example:

in rubyzip line 583,

def set_time(binaryDosDate, binaryDosTime)
@time = Time.parse_binary_dos_format(binaryDosDate,
rescue ArgumentError
puts “Invalid date/time in zip entry”

I need to be able to ‘catch’ the exception thrown here, as my app
needs to reject zip files that have invalid date/timestamps

is there a way of doing this before/during opening the zip file?

Thank you in advance

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs