We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7cd41f commit 0fee931Copy full SHA for 0fee931
lib/docx/document.rb
@@ -37,8 +37,10 @@ def initialize(path_or_io, options = {})
37
@doc = Nokogiri::XML(@document_xml)
38
load_styles
39
yield(self) if block_given?
40
+ rescue Zip::Error => e
41
+ raise 'File not supported'
42
ensure
- @zip.close
43
+ @zip.close unless @zip.nil?
44
end
45
46
# This stores the current global document properties, for now
0 commit comments