Class: Issuu::IssuuExceptionManager

Inherits:
Object
  • Object
show all
Defined in:
lib/issuu/issuu_exception_manager.rb

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ IssuuExceptionManager

Returns a new instance of IssuuExceptionManager.



3
4
5
6
7
8
9
# File 'lib/issuu/issuu_exception_manager.rb', line 3

def initialize(params)
  @message = "##{params["code"]} #{params["message"]}"
  case params["code"]
  when "200","201" then
    @message << ": '#{params["field"]}'"
  end
end

Instance Method Details

#raise_errorObject

Raises:



11
12
13
# File 'lib/issuu/issuu_exception_manager.rb', line 11

def raise_error
  raise IssuuException, @message
end