Exception: Hungrytable::EnhancedErrors::EnhancedServerError

Inherits:
ServerError show all
Defined in:
lib/hungrytable/enhanced_errors.rb

Overview

Enhance ServerError with diagnostic info

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, status_code = nil) ⇒ EnhancedServerError

Returns a new instance of EnhancedServerError.



57
58
59
60
61
# File 'lib/hungrytable/enhanced_errors.rb', line 57

def initialize(message = nil, status_code = nil)
  @status_code = status_code
  @diagnostics = build_diagnostics
  super(build_message(message))
end

Instance Attribute Details

#diagnosticsObject (readonly)

Returns the value of attribute diagnostics.



55
56
57
# File 'lib/hungrytable/enhanced_errors.rb', line 55

def diagnostics
  @diagnostics
end