Exception: ApiAi::Error
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- ApiAi::Error
- Defined in:
- lib/api_ai/error.rb
Overview
This is the usual error raised on any api.ai related Errors
Direct Known Subclasses
Instance Attribute Summary collapse
-
#error ⇒ String
The name of the error.
-
#http_response ⇒ Object
Server response.
Instance Method Summary collapse
-
#initialize(error, http_response = nil) ⇒ Error
constructor
A new instance of Error.
-
#to_s ⇒ String
String representation.
Constructor Details
#initialize(error, http_response = nil) ⇒ Error
Returns a new instance of Error.
14 15 16 17 |
# File 'lib/api_ai/error.rb', line 14 def initialize(error, http_response = nil) @error = error @http_response = http_response end |
Instance Attribute Details
#error ⇒ String
Returns the name of the error.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/api_ai/error.rb', line 10 class Error < RuntimeError attr_accessor :http_response, :error def initialize(error, http_response = nil) @error = error @http_response = http_response end # String representation # @return [String] def to_s "#{error}" end end |
#http_response ⇒ Object
Returns server response.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/api_ai/error.rb', line 10 class Error < RuntimeError attr_accessor :http_response, :error def initialize(error, http_response = nil) @error = error @http_response = http_response end # String representation # @return [String] def to_s "#{error}" end end |
Instance Method Details
#to_s ⇒ String
String representation
21 22 23 |
# File 'lib/api_ai/error.rb', line 21 def to_s "#{error}" end |