Exception: Textus::BadContent

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(path, m) ⇒ BadContent

Returns a new instance of BadContent.



79
80
81
82
83
84
85
# File 'lib/textus/errors.rb', line 79

def initialize(path, m)
  super(
    "bad_content", m,
    details: { "path" => path },
    hint: "JSON/YAML parse failed; run the file through 'jq .' or 'yq .' to find the syntax error",
  )
end