Exception: Google::Gax::GaxError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/google/gax/errors.rb

Overview

Common base class for exceptions raised by GAX.

Direct Known Subclasses

RetryError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, cause: nil) ⇒ GaxError

Returns a new instance of GaxError.

Parameters:

  • msg (String)

    describes the error that occurred.

  • cause (Error) (defaults to: nil)

    the exception raised by a lower layer of the RPC stack (for example, gRPC) that caused this exception, or None if this exception originated in GAX.



40
41
42
43
44
# File 'lib/google/gax/errors.rb', line 40

def initialize(msg, cause:nil)
  msg = "GaxError #{msg}, caused by #{cause}" if cause
  super(msg)
  @cause = cause
end

Instance Attribute Details

#causeObject (readonly)

Returns the value of attribute cause.



34
35
36
# File 'lib/google/gax/errors.rb', line 34

def cause
  @cause
end