Method: Webby::Helpers::GraphvizHelper.error_check
- Defined in:
- lib/webby/helpers/graphviz_helper.rb
.error_check(file) ⇒ Object
call-seq:
GraphvizHelper.error_check( file )
Check the temporary error file to see if it contains any error messages from the graphviz program. If it is not empty, then read the contents and log an error message and raise an exception.
31 32 33 34 35 36 |
# File 'lib/webby/helpers/graphviz_helper.rb', line 31 def self.error_check( file ) if ::File.size(file.path) != 0 msg = "\n" << ::File.read(file.path).strip raise ::Webby::Error, msg end end |