Exception: YANAPI::ContentError

Inherits:
Error
  • Object
show all
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. Human beings should pay attention to it!

Instance Method Summary collapse

Constructor Details

#initialize(arg) ⇒ ContentError

it takes a kind of Exception or String as the argument



9
10
11
12
13
14
15
16
17
# File 'lib/yanapi/error.rb', line 9

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