Exception: GooglePlus::RequestError

Inherits:
Exception
  • Object
show all
Includes:
Entity
Defined in:
lib/google_plus/errors/request_error.rb

Overview

An error class for wrapping errors made during requests, and making its attributes available similar to any [GooglePlus::Entity]

Instance Attribute Summary

Attributes included from Entity

#attributes

Instance Method Summary collapse

Methods included from Entity

included, #method_missing, #respond_to?

Constructor Details

#initialize(e) ⇒ RequestError

Instantiate a new GooglePlus::RequestError and allow it to be accessed as an entity

Parameters:

  • e (Exception)

    The original exception



12
13
14
15
# File 'lib/google_plus/errors/request_error.rb', line 12

def initialize(e)
  load_hash JSON.parse(e.response.body)
  super(error.message)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class GooglePlus::Entity