Exception: ClickhouseRuby::Error

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

Overview

Base error class for all ClickhouseRuby errors All errors include context information to aid debugging

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, original_error: nil) ⇒ Error

Returns a new instance of Error.

Parameters:

  • message (String) (defaults to: nil)

    the error message

  • original_error (Exception, nil) (defaults to: nil)

    the underlying exception



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

def initialize(message = nil, original_error: nil)
  @original_error = original_error
  super(message)
end

Instance Attribute Details

#original_errorException? (readonly)

Returns the original exception that caused this error.

Returns:

  • (Exception, nil)

    the original exception that caused this error



8
9
10
# File 'lib/clickhouse_ruby/errors.rb', line 8

def original_error
  @original_error
end