Exception: Fluent::BigQuery::Writer::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/fluent/plugin/bigquery/writer.rb

Direct Known Subclasses

RetryableError, UnRetryableError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, origin = nil) ⇒ Error

Returns a new instance of Error.



9
10
11
12
# File 'lib/fluent/plugin/bigquery/writer.rb', line 9

def initialize(message, origin = nil)
  @origin = origin
  super(message || origin.message)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/fluent/plugin/bigquery/writer.rb', line 14

def method_missing(name, *args)
  if @origin
    @origin.send(name, *args)
  else
    super
  end
end

Instance Attribute Details

#originObject (readonly)

Returns the value of attribute origin.



7
8
9
# File 'lib/fluent/plugin/bigquery/writer.rb', line 7

def origin
  @origin
end

Instance Method Details

#reasonObject



22
23
24
# File 'lib/fluent/plugin/bigquery/writer.rb', line 22

def reason
  @origin && @origin.respond_to?(:reason) ? @origin.reason : nil
end

#retryable?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/fluent/plugin/bigquery/writer.rb', line 30

def retryable?
  false
end

#status_codeObject



26
27
28
# File 'lib/fluent/plugin/bigquery/writer.rb', line 26

def status_code
  @origin && @origin.respond_to?(:status_code) ? @origin.status_code : nil
end