Exception: Vexapion::HTTPError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/vexapion/errors/http_errors.rb

Direct Known Subclasses

Error, Fatal, RetryException

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code = nil, msg = nil) ⇒ HTTPError

Returns a new instance of HTTPError.



12
13
14
15
# File 'lib/vexapion/errors/http_errors.rb', line 12

def initialize(code = nil, msg = nil)
	@http_status_code = code
	@message = msg
end

Instance Attribute Details

#http_status_codeObject (readonly)

Returns the value of attribute http_status_code.



9
10
11
# File 'lib/vexapion/errors/http_errors.rb', line 9

def http_status_code
  @http_status_code
end

#messageObject (readonly)

Returns the value of attribute message.



10
11
12
# File 'lib/vexapion/errors/http_errors.rb', line 10

def message
  @message
end

Instance Method Details

#to_sObject



17
18
19
# File 'lib/vexapion/errors/http_errors.rb', line 17

def to_s
 "#{@http_status_code}: #{@message}"
end