From a20fd4fdcfafbf47bd5a473e5ed2741d8255d584 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 28 Nov 2011 13:53:36 -0600 Subject: [PATCH] Raise Tex::Error --- lib/gollum/tex.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/gollum/tex.rb b/lib/gollum/tex.rb index 71646fa9..7b0b60c4 100644 --- a/lib/gollum/tex.rb +++ b/lib/gollum/tex.rb @@ -54,16 +54,16 @@ module Gollum ::File.open(tex_path, 'w') { |f| f.write(Template % formula) } result = sh latex_path, '-interaction=batchmode', 'formula.tex', :cwd => path - raise "`latex` command failed: #{result}" unless ::File.exist?(eps_path) + raise Error, "`latex` command failed: #{result}" unless ::File.exist?(eps_path) result = sh dvips_path, '-o', eps_path, '-E', dvi_path - raise "`dvips` command failed: #{result}" unless ::File.exist?(dvi_path) + raise Error, "`dvips` command failed: #{result}" unless ::File.exist?(dvi_path) result = sh convert_path, '+adjoin', '-antialias', '-transparent', 'white', '-density', '150x150', eps_path, png_path - raise "`convert` command failed: #{result}" unless ::File.exist?(png_path) + raise Error, "`convert` command failed: #{result}" unless ::File.exist?(png_path) ::File.read(png_path) end