Exception: BingSearch::ServiceError
- Inherits:
-
StandardError
- Object
- StandardError
- BingSearch::ServiceError
- Defined in:
- lib/bing-search/errors.rb
Instance Attribute Summary collapse
-
#code ⇒ String
readonly
The error code returned by Bing.
Instance Method Summary collapse
-
#initialize(code, message = nil) ⇒ ServiceError
constructor
A new instance of ServiceError.
- #to_s ⇒ String
Constructor Details
#initialize(code, message = nil) ⇒ ServiceError
Returns a new instance of ServiceError.
12 13 14 15 |
# File 'lib/bing-search/errors.rb', line 12 def initialize(code, = nil) super() @code = code end |
Instance Attribute Details
#code ⇒ String (readonly)
The error code returned by Bing
6 7 8 |
# File 'lib/bing-search/errors.rb', line 6 def code @code end |
Instance Method Details
#to_s ⇒ String
19 20 21 |
# File 'lib/bing-search/errors.rb', line 19 def to_s "Bing error #{code}: #{super}" end |