Closed manovasanth1227 closed 1 year ago
When a file other than docx is provided, an unexpected error is thrown.
Steps to reproduce the behavior or put a short code to reproduce the bug.
require 'docx' doc = Docx::Document.new('/local/usr/path/reciept.pdf') ## error thrown <Zip::Error: Zip end of central directory signature not found>
Should throw valid error message
docx
I have also fixed the issue and raised the PR - https://github.com/ruby-docx/docx/pull/135 @satoryu can you please review?
Describe the bug
When a file other than docx is provided, an unexpected error is thrown.
To Reproduce
Steps to reproduce the behavior or put a short code to reproduce the bug.
example
Expected behavior
Should throw valid error message
Environment
docx
gem version: [e.g 0.5.0]