Exception: Bobot::FacebookError
- Defined in:
- lib/bobot/exceptions.rb
Overview
Base error class for Facebook API errors.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#extras ⇒ Object
readonly
Returns the value of attribute extras.
-
#fbtrace_id ⇒ Object
readonly
Returns the value of attribute fbtrace_id.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#subcode ⇒ Object
readonly
Returns the value of attribute subcode.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#user_msg ⇒ Object
readonly
Returns the value of attribute user_msg.
-
#user_title ⇒ Object
readonly
Returns the value of attribute user_title.
Instance Method Summary collapse
-
#initialize(error) ⇒ FacebookError
constructor
A new instance of FacebookError.
- #to_s ⇒ Object
Constructor Details
#initialize(error) ⇒ FacebookError
Returns a new instance of FacebookError.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/bobot/exceptions.rb', line 25 def initialize(error) @message = error['message'] @type = error['type'] @code = error['code'] @subcode = error['error_subcode'] @user_title = error['error_user_title'] @user_msg = error['error_user_msg'] @fbtrace_id = error['fbtrace_id'] @extras = error['extras'] end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
18 19 20 |
# File 'lib/bobot/exceptions.rb', line 18 def code @code end |
#extras ⇒ Object (readonly)
Returns the value of attribute extras.
23 24 25 |
# File 'lib/bobot/exceptions.rb', line 23 def extras @extras end |
#fbtrace_id ⇒ Object (readonly)
Returns the value of attribute fbtrace_id.
22 23 24 |
# File 'lib/bobot/exceptions.rb', line 22 def fbtrace_id @fbtrace_id end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
16 17 18 |
# File 'lib/bobot/exceptions.rb', line 16 def @message end |
#subcode ⇒ Object (readonly)
Returns the value of attribute subcode.
19 20 21 |
# File 'lib/bobot/exceptions.rb', line 19 def subcode @subcode end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
17 18 19 |
# File 'lib/bobot/exceptions.rb', line 17 def type @type end |
#user_msg ⇒ Object (readonly)
Returns the value of attribute user_msg.
21 22 23 |
# File 'lib/bobot/exceptions.rb', line 21 def user_msg @user_msg end |
#user_title ⇒ Object (readonly)
Returns the value of attribute user_title.
20 21 22 |
# File 'lib/bobot/exceptions.rb', line 20 def user_title @user_title end |
Instance Method Details
#to_s ⇒ Object
36 37 38 |
# File 'lib/bobot/exceptions.rb', line 36 def to_s end |