Exception: Pubnub::Error
Overview
Some custom pubnub errors
Direct Known Subclasses
ArgumentError, InitializationError, JSONParseError, RequestError, ResponseError
Instance Attribute Summary collapse
-
#env ⇒ Object
readonly
Returns the value of attribute env.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(env = {}) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(env = {}) ⇒ Error
Returns a new instance of Error.
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/pubnub/error.rb', line 7 def initialize(env = {}) unless env.instance_of? Hash fail ::ArgumentError, 'Env passed to Pubnub::Error must be a hash' end @env = env @message = '' log_error end |