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 = nil, service = nil, args = nil, response = nil) ⇒ Error

Returns a new instance of Error.



291
292
293
294
295
296
297
298
299
300
# File 'lib/lvs/json_service/base.rb', line 291

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

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

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



289
290
291
# File 'lib/lvs/json_service/base.rb', line 289

def args
  @args
end

#backtraceObject (readonly)

Returns the value of attribute backtrace.



289
290
291
# File 'lib/lvs/json_service/base.rb', line 289

def backtrace
  @backtrace
end

#codeObject (readonly)

Returns the value of attribute code.



289
290
291
# File 'lib/lvs/json_service/base.rb', line 289

def code
  @code
end

#json_responseObject (readonly)

Returns the value of attribute json_response.



289
290
291
# File 'lib/lvs/json_service/base.rb', line 289

def json_response
  @json_response
end

#messageObject (readonly)

Returns the value of attribute message.



289
290
291
# File 'lib/lvs/json_service/base.rb', line 289

def message
  @message
end

#serviceObject (readonly)

Returns the value of attribute service.



289
290
291
# File 'lib/lvs/json_service/base.rb', line 289

def service
  @service
end