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.
-
#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.
30 31 32 33 34 35 36 37 38 |
# File 'lib/bobot/exceptions.rb', line 30 def initialize(error) = 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'] end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
24 25 26 |
# File 'lib/bobot/exceptions.rb', line 24 def code @code end |
#fbtrace_id ⇒ Object (readonly)
Returns the value of attribute fbtrace_id.
28 29 30 |
# File 'lib/bobot/exceptions.rb', line 28 def fbtrace_id @fbtrace_id end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
22 23 24 |
# File 'lib/bobot/exceptions.rb', line 22 def end |
#subcode ⇒ Object (readonly)
Returns the value of attribute subcode.
25 26 27 |
# File 'lib/bobot/exceptions.rb', line 25 def subcode @subcode end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
23 24 25 |
# File 'lib/bobot/exceptions.rb', line 23 def type @type end |
#user_msg ⇒ Object (readonly)
Returns the value of attribute user_msg.
27 28 29 |
# File 'lib/bobot/exceptions.rb', line 27 def user_msg @user_msg end |
#user_title ⇒ Object (readonly)
Returns the value of attribute user_title.
26 27 28 |
# File 'lib/bobot/exceptions.rb', line 26 def user_title @user_title end |
Instance Method Details
#to_s ⇒ Object
40 41 42 |
# File 'lib/bobot/exceptions.rb', line 40 def to_s end |