Exception: ChinoError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- ChinoError
- Defined in:
- lib/chino_ruby.rb
Overview
——————————CHINO ERRORS———————————–# Class for defining common errors
Direct Known Subclasses
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
-
#http_response ⇒ Object
Returns the value of attribute http_response.
-
#user_error ⇒ Object
Returns the value of attribute user_error.
Instance Method Summary collapse
-
#initialize(error, http_response = nil, user_error = nil) ⇒ ChinoError
constructor
A new instance of ChinoError.
- #to_s ⇒ Object
Constructor Details
#initialize(error, http_response = nil, user_error = nil) ⇒ ChinoError
Returns a new instance of ChinoError.
14 15 16 17 18 |
# File 'lib/chino_ruby.rb', line 14 def initialize(error, http_response=nil, user_error=nil) @error = error @http_response = http_response @user_error = user_error end |
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
12 13 14 |
# File 'lib/chino_ruby.rb', line 12 def error @error end |
#http_response ⇒ Object
Returns the value of attribute http_response.
12 13 14 |
# File 'lib/chino_ruby.rb', line 12 def http_response @http_response end |
#user_error ⇒ Object
Returns the value of attribute user_error.
12 13 14 |
# File 'lib/chino_ruby.rb', line 12 def user_error @user_error end |
Instance Method Details
#to_s ⇒ Object
20 21 22 23 |
# File 'lib/chino_ruby.rb', line 20 def to_s return "#{user_error} (#{error})" if user_error "#{error}" end |