Exception: LVS::JsonService::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/lvs/json_service/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, code, service, args, response = nil) ⇒ Error

Returns a new instance of Error.



214
215
216
217
218
219
220
221
222
# File 'lib/lvs/json_service/base.rb', line 214

def initialize(message, code, service, args, response=nil)
  @message = message
  @code   = code
  @service = service
  @args   = args
  @json_response = response

  super "#{message}\n#{service} (#{args.inspect})"
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



212
213
214
# File 'lib/lvs/json_service/base.rb', line 212

def args
  @args
end

#codeObject (readonly)

Returns the value of attribute code.



212
213
214
# File 'lib/lvs/json_service/base.rb', line 212

def code
  @code
end

#json_responseObject (readonly)

Returns the value of attribute json_response.



212
213
214
# File 'lib/lvs/json_service/base.rb', line 212

def json_response
  @json_response
end

#messageObject (readonly)

Returns the value of attribute message.



212
213
214
# File 'lib/lvs/json_service/base.rb', line 212

def message
  @message
end

#serviceObject (readonly)

Returns the value of attribute service.



212
213
214
# File 'lib/lvs/json_service/base.rb', line 212

def service
  @service
end