Exception: RiminderResponseException

Inherits:
RiminderException show all
Defined in:
lib/riminderException.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, exp) ⇒ RiminderResponseException

Returns a new instance of RiminderResponseException.



30
31
32
33
34
35
36
37
38
39
40
# File 'lib/riminderException.rb', line 30

def initialize(msg, exp)
    response_body = exp.http_body
    if (response_body.length >= 201)
        response_body = response_body[0, 200] + '...'
    end
    msg = msg + exp.to_s + " => " + response_body

    @response_body = exp.http_body
    @status_code = exp.http_code
    super(msg)
end

Instance Attribute Details

#response_bodyObject (readonly)

Returns the value of attribute response_body.



27
28
29
# File 'lib/riminderException.rb', line 27

def response_body
  @response_body
end

#status_codeObject (readonly)

Returns the value of attribute status_code.



28
29
30
# File 'lib/riminderException.rb', line 28

def status_code
  @status_code
end