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.



284
285
286
287
288
289
290
291
292
293
# File 'lib/lvs/json_service/base.rb', line 284

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.



282
283
284
# File 'lib/lvs/json_service/base.rb', line 282

def args
  @args
end

#backtraceObject (readonly)

Returns the value of attribute backtrace.



282
283
284
# File 'lib/lvs/json_service/base.rb', line 282

def backtrace
  @backtrace
end

#codeObject (readonly)

Returns the value of attribute code.



282
283
284
# File 'lib/lvs/json_service/base.rb', line 282

def code
  @code
end

#json_responseObject (readonly)

Returns the value of attribute json_response.



282
283
284
# File 'lib/lvs/json_service/base.rb', line 282

def json_response
  @json_response
end

#messageObject (readonly)

Returns the value of attribute message.



282
283
284
# File 'lib/lvs/json_service/base.rb', line 282

def message
  @message
end

#serviceObject (readonly)

Returns the value of attribute service.



282
283
284
# File 'lib/lvs/json_service/base.rb', line 282

def service
  @service
end