Exception: Vk::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/vk/error.rb,
lib/vk/exceptions.rb

Overview

Class for requesting vk.com api data

Author:

  • Alexander Semyonov

Direct Known Subclasses

TooMuchArguments

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, details = {}) ⇒ Error

Returns a new instance of Error.



8
9
10
11
12
13
14
# File 'lib/vk/error.rb', line 8

def initialize(msg, details = {})
  if msg.is_a?(Hash)
    details, msg = msg, msg['error']['error_msg']
  end
  super(msg)
  @details = details
end

Instance Attribute Details

#detailsObject (readonly)

Returns the value of attribute details.



16
17
18
# File 'lib/vk/error.rb', line 16

def details
  @details
end