Exception: TriCoreDB::ParameterError

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

Overview

A SQL parameter this driver will not encode. Raised before anything is sent.

Instance Attribute Summary collapse

Attributes inherited from Error

#code, #leader_hint

Instance Method Summary collapse

Methods inherited from Error

#redirect?

Constructor Details

#initialize(index, message) ⇒ ParameterError

Returns a new instance of ParameterError.



91
92
93
94
# File 'lib/tricoredb/errors.rb', line 91

def initialize(index, message)
  super("parameter ##{index}: #{message}")
  @index = index
end

Instance Attribute Details

#index ⇒ Integer (readonly)

Returns the 1-based parameter position.

Returns:

  • (Integer) —

    the 1-based parameter position



89
90
91
# File 'lib/tricoredb/errors.rb', line 89

def index
  @index
end