Exception: Textus::BadRender

Inherits:
Error
  • Object
show all
Defined in:
lib/textus/errors.rb

Instance Attribute Summary

Attributes inherited from Error

#code

Instance Method Summary collapse

Methods inherited from Error

#details, #exit_code, #hint, #to_envelope

Constructor Details

#initialize(m, format: nil) ⇒ BadRender

Returns a new instance of BadRender.



174
175
176
177
178
179
180
181
182
# File 'lib/textus/errors.rb', line 174

def initialize(m, format: nil)
  hint =
    if format
      "the template rendered invalid #{format}; try rendering with mock data and parsing the output before re-running drain"
    else
      "the template rendered invalid content; try rendering with mock data and parsing the output before re-running drain"
    end
  super("bad_render", m, hint: hint)
end