Module: Cql::Client::SynchronousBacktrace

Included in:
SynchronousClient, SynchronousPreparedStatement
Defined in:
lib/cql/client/synchronous_client.rb

Instance Method Summary collapse

Instance Method Details

#synchronous_backtraceObject



7
8
9
10
11
12
13
14
15
16
# File 'lib/cql/client/synchronous_client.rb', line 7

def synchronous_backtrace
  yield
rescue CqlError => e
  new_backtrace = caller
  if new_backtrace.first.include?(SYNCHRONOUS_BACKTRACE_METHOD_NAME)
    new_backtrace = new_backtrace.drop(1)
  end
  e.set_backtrace(new_backtrace)
  raise
end