Exception: Distelli::BaseException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/distelli/serviceinterface.rb

Direct Known Subclasses

ClientError, ServerError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil, err_code = nil, err_msg = nil, http_code = nil) ⇒ BaseException

Returns a new instance of BaseException.



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/distelli/serviceinterface.rb', line 6

def initialize(msg=nil, err_code=nil, err_msg=nil, http_code=nil)
  super(msg)
  @err_code = err_code
  if err_msg == nil
    @err_msg = msg
  else
    @err_msg = err_msg
  end
  if http_code != nil
    @http_code = http_code
  end
end

Instance Attribute Details

#err_codeObject

Returns the value of attribute err_code.



5
6
7
# File 'lib/distelli/serviceinterface.rb', line 5

def err_code
  @err_code
end

#err_msgObject

Returns the value of attribute err_msg.



5
6
7
# File 'lib/distelli/serviceinterface.rb', line 5

def err_msg
  @err_msg
end

#http_codeObject

Returns the value of attribute http_code.



5
6
7
# File 'lib/distelli/serviceinterface.rb', line 5

def http_code
  @http_code
end