Exception: FacebookTopics::ApiError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/facebook_topics/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(err) ⇒ ApiError

Returns a new instance of ApiError.



5
6
7
8
9
10
# File 'lib/facebook_topics/error.rb', line 5

def initialize(err)

  @code = err["code"]
  @type = err["type"]
  super("#{@type} #{err['message']} - code: #{@code}")
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



3
4
5
# File 'lib/facebook_topics/error.rb', line 3

def code
  @code
end

#typeObject

Returns the value of attribute type.



3
4
5
# File 'lib/facebook_topics/error.rb', line 3

def type
  @type
end