Exception: Gcloud::Vision::Error

Inherits:
Error
  • Object
show all
Defined in:
lib/gcloud/vision/errors.rb

Overview

# Vision Error

Base Vision exception class.

Direct Known Subclasses

ApiError

Instance Attribute Summary collapse

Attributes inherited from Error

#inner

Class Method Summary collapse

Methods inherited from Error

from_error, #initialize, klass_for

Constructor Details

This class inherits a constructor from Gcloud::Error

Instance Attribute Details

#responseObject (readonly)

The response object of the failed HTTP request.



27
28
29
# File 'lib/gcloud/vision/errors.rb', line 27

def response
  @response
end

Class Method Details

.from_response(resp) ⇒ Object



30
31
32
33
34
# File 'lib/gcloud/vision/errors.rb', line 30

def self.from_response resp
  new.tap do |e|
    e.instance_variable_set "@response", resp
  end
end