Exception: Textus::BadRender

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

Instance Attribute Summary

Attributes inherited from Error

#code, #details, #exit_code, #hint

Instance Method Summary collapse

Methods inherited from Error

#to_envelope

Constructor Details

#initialize(m, format: nil) ⇒ BadRender

Returns a new instance of BadRender.



146
147
148
149
150
151
152
153
154
# File 'lib/textus/errors.rb', line 146

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 build"
    else
      "the template rendered invalid content; try rendering with mock data and parsing the output before re-running build"
    end
  super("bad_render", m, hint: hint)
end