Exception: YANAPI::ContentError
- Defined in:
- lib/yanapi/error.rb
Overview
The result is illformed (as xml|json|php|rss) and cannot be parsed or contains an error message (humans should read it carefully). Yahoo! APIs are irregular concerning errors, not every input incorrectness results in a HTTP Error Code, but often in a normal response with an error message in the response body.
Instance Method Summary collapse
-
#initialize(arg) ⇒ ContentError
constructor
it takes a kind of Exception or String as the argument.
Constructor Details
#initialize(arg) ⇒ ContentError
it takes a kind of Exception or String as the argument
34 35 36 37 38 39 40 41 42 |
# File 'lib/yanapi/error.rb', line 34 def initialize(arg) if arg.kind_of? String msg = arg else msg = "You got illformed content:\n" + "#{arg.message} (#{arg.class})" end super(msg) end |