Exception: Card::Error::ServerError
- Inherits:
-
Card::Error
- Object
- Exception
- StandardError
- Card::Error
- Card::Error::ServerError
- Defined in:
- card/lib/card/error.rb
Overview
error attributable to code (as opposed to card configuration)
Constant Summary
Constants inherited from Card::Error
Constants inherited from StandardError
StandardError::MAX_BACKTRACE_LINES
Instance Attribute Summary
Attributes inherited from Card::Error
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Card::Error
#card_message_text, #initialize, #message_from_card, report, rescue_card
Constructor Details
This class inherits a constructor from Card::Error
Class Method Details
.debugger_on? ⇒ Boolean
57 58 59 |
# File 'card/lib/card/error.rb', line 57 def self.debugger_on? Card::Codename[:debugger] && Card[:debugger]&.content =~ /on/ end |
.status_code ⇒ Object
51 52 53 54 55 |
# File 'card/lib/card/error.rb', line 51 def self.status_code # Errors with status code 900 are displayed as modal instead of inside # the "card-notice" div`` debugger_on? ? 900 : 500 end |
.view ⇒ Object
47 48 49 |
# File 'card/lib/card/error.rb', line 47 def self.view debugger_on? ? :debug_server_error : :server_error end |
Instance Method Details
#report ⇒ Object
61 62 63 64 |
# File 'card/lib/card/error.rb', line 61 def report super card&.notable_exception_raised end |