Exception: Vexapion::HTTPError
- Inherits:
-
StandardError
- Object
- StandardError
- Vexapion::HTTPError
- Defined in:
- lib/vexapion/errors/http_errors.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#http_status_code ⇒ Object
readonly
Returns the value of attribute http_status_code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(code = nil, msg = nil) ⇒ HTTPError
constructor
A new instance of HTTPError.
- #to_s ⇒ Object
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_code ⇒ Object (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 |
#message ⇒ Object (readonly)
Returns the value of attribute message.
10 11 12 |
# File 'lib/vexapion/errors/http_errors.rb', line 10 def @message end |
Instance Method Details
#to_s ⇒ Object
17 18 19 |
# File 'lib/vexapion/errors/http_errors.rb', line 17 def to_s "#{@http_status_code}: #{@message}" end |