Module: Card::Format::Error
- Included in:
- Card::Format
- Defined in:
- lib/card/format/error.rb
Instance Method Summary collapse
- #debug_error(e, view) ⇒ Object
- #error_cardname ⇒ Object
- #rendering_error(_exception, view) ⇒ Object
- #rescue_view(e, view) ⇒ Object
Instance Method Details
#debug_error(e, view) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/card/format/error.rb', line 11 def debug_error e, view Rails.logger.info "#{rendering_error e, view}:\n" \ "#{e.class} : #{e.}" debug = Card[:debugger] raise e if debug && debug.content == "on" end |
#error_cardname ⇒ Object
18 19 20 |
# File 'lib/card/format/error.rb', line 18 def error_cardname card && card.name.present? ? card.name : "unknown card" end |
#rendering_error(_exception, view) ⇒ Object
22 23 24 |
# File 'lib/card/format/error.rb', line 22 def rendering_error _exception, view "Error rendering: #{error_cardname} (#{view} view)" end |