Exception: Blix::Rest::ServiceError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/blix/rest.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status = nil, headers = nil) ⇒ ServiceError

Returns a new instance of ServiceError.



97
98
99
100
101
# File 'lib/blix/rest.rb', line 97

def initialize(message, status = nil, headers = nil)
  super(message || "")
  @status = status || 406
  @headers = headers
end

Instance Attribute Details

#headersObject (readonly)

Returns the value of attribute headers.



95
96
97
# File 'lib/blix/rest.rb', line 95

def headers
  @headers
end

#statusObject (readonly)

Returns the value of attribute status.



94
95
96
# File 'lib/blix/rest.rb', line 94

def status
  @status
end