Exception: Exocora::TemplateError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/exocora/errors.rb

Overview

Represents an error encountered when processing a template.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, original) ⇒ TemplateError

Returns a new instance of TemplateError.



32
33
34
35
# File 'lib/exocora/errors.rb', line 32

def initialize(message, original)
  @message = message
  @original = original
end

Instance Attribute Details

#messageObject

Returns the value of attribute message.



31
32
33
# File 'lib/exocora/errors.rb', line 31

def message
  @message
end

#originalObject

Returns the value of attribute original.



31
32
33
# File 'lib/exocora/errors.rb', line 31

def original
  @original
end

Instance Method Details

#to_htmlObject



37
38
39
40
41
# File 'lib/exocora/errors.rb', line 37

def to_html
  "<p>" + Erubis::XmlHelper::escape_xml(@message) + "</p>" +
  "<p>The original exception was:</p>" +
  @original.to_html
end