Exception: Vkontakte::App::VkException

Inherits:
Exception
  • Object
show all
Defined in:
lib/vkontakte/app/base.rb

Overview

Errors is expired.” authorization failed: invalid application type”,“request_params”:}}

Instance Method Summary collapse

Constructor Details

#initialize(method_name, options) ⇒ VkException

Returns a new instance of VkException.



97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/vkontakte/app/base.rb', line 97

def initialize(method_name, options)
  error_hash = options.symbolize_keys
  @message = "Error in #{method_name}: "

  if error_hash[:error].is_a?(Hash)
    @message += error_hash[:error].inspect
  else
    @message += [error_hash[:error], error_hash[:error_description]].join('-')
  end

  super @message
end