Exception: Exocora::TemplateError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Exocora::TemplateError
- Defined in:
- lib/exocora/errors.rb
Overview
Represents an error encountered when processing a template.
Instance Attribute Summary collapse
-
#message ⇒ Object
Returns the value of attribute message.
-
#original ⇒ Object
Returns the value of attribute original.
Instance Method Summary collapse
-
#initialize(message, original) ⇒ TemplateError
constructor
A new instance of TemplateError.
- #to_html ⇒ Object
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(, original) @message = @original = original end |
Instance Attribute Details
#message ⇒ Object
Returns the value of attribute message.
31 32 33 |
# File 'lib/exocora/errors.rb', line 31 def @message end |
#original ⇒ Object
Returns the value of attribute original.
31 32 33 |
# File 'lib/exocora/errors.rb', line 31 def original @original end |
Instance Method Details
#to_html ⇒ Object
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 |