Module: RiderServer::ExceptionExtension

Included in:
Exception
Defined in:
lib/rider_server/exception_extension.rb

Constant Summary collapse

INPUT_FORMAT =
%r{^((?:[a-zA-Z]:)?[^:]+):(\d+)(?::in `([^']+)')?$}

Instance Method Summary collapse

Instance Method Details

#__rider_bindings_stackObject



24
25
26
# File 'lib/rider_server/exception_extension.rb', line 24

def __rider_bindings_stack
  @__rider_bindings_stack || []
end

#set_backtraceObject



16
17
18
19
20
21
22
# File 'lib/rider_server/exception_extension.rb', line 16

def set_backtrace(...)
  if caller.none? { |loc| loc.match(INPUT_FORMAT) && Regexp.last_match(1) == __FILE__ }
    @__rider_bindings_stack = ::Kernel.binding.callers.drop(1)
  end

  super
end