Exception: Card::Error::ServerError
Overview
error attributable to code (as opposed to card configuration)
Constant Summary
Constants inherited
from Card::Error
KEY_MAP
Instance Attribute Summary
Attributes inherited from Card::Error
#backtrace, #card
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Card::Error
add_card_errors, card_error_class, #card_message_text, cardify_exception, #initialize, invalid_card_error_class, #message_from_card, report
Constructor Details
This class inherits a constructor from Card::Error
Class Method Details
.debugger_on? ⇒ Boolean
54
55
56
|
# File 'lib/card/error.rb', line 54
def self.debugger_on?
Card::Codename[:debugger] && Card[:debugger]&.content =~ /on/
end
|
.status_code ⇒ Object
48
49
50
51
52
|
# File 'lib/card/error.rb', line 48
def self.status_code
debugger_on? ? 900 : 500
end
|
.view ⇒ Object
44
45
46
|
# File 'lib/card/error.rb', line 44
def self.view
debugger_on? ? :debug_server_error : :server_error
end
|
Instance Method Details
#report ⇒ Object
58
59
60
61
|
# File 'lib/card/error.rb', line 58
def report
super
card&.notable_exception_raised
end
|