Method: Awestruct::ExceptionHelper.html_error_report

Defined in:
lib/awestruct/util/exception_helper.rb

.html_error_report(exception, relative_source_path) ⇒ Object



35
36
37
38
39
40
41
42
# File 'lib/awestruct/util/exception_helper.rb', line 35

def self.html_error_report exception, relative_source_path
  mark_failed
  "<h1>#{exception.message}</h1>
<h2>Rendering file #{relative_source_path} resulted in a failure.</h2>
<p>Line: #{(exception.respond_to? :line) ? exception.line : 'unknown'}</p>
<p>Backtrace:</p>
<pre>#{exception.backtrace.join "\n"}</pre>"
end