Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exceptions in generate fail silently #1

Open
joesavage opened this issue Jul 20, 2013 · 1 comment
Open

Exceptions in generate fail silently #1

joesavage opened this issue Jul 20, 2013 · 1 comment

Comments

@joesavage
Copy link

The generate private method suppresses any exceptions through begin and rescue , and hence if 'latex', 'dvips' or 'convert' aren't present on the machine, the sh method's exception isn't shown, and the rendering fails silently (much to the confusion of the user as to why an image wasn't generated).

begin
  temp_dir = create_temp_dir(hash)
  latex2dvi(temp_dir, formula) #Exception here? Too bad. Suppressed.
  dvi2ps(temp_dir)
  ps2image(temp_dir, hash)
rescue
  FileUtils.rm_rf(temp_dir) if !@options[:debug]
else
  FileUtils.rm_rf(temp_dir)
end
@minad
Copy link
Owner

minad commented Jul 20, 2013

latex-renderer is unmaintained, you could try https://github.com/minad/imaginator which is more up-to-date

@minad minad closed this as completed Jul 20, 2013
@minad minad reopened this Jul 20, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants