instance method build_backtrace

Ruby on Rails 7.1.6

Since v7.1.6 Private

Available in: v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

build_backtrace()

No documentation comment.

Source
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 265
      def build_backtrace
        built_methods = {}

        ActionView::PathRegistry.all_resolvers.each do |resolver|
          resolver.built_templates.each do |template|
            built_methods[template.method_name] = template
          end
        end

        (@exception.backtrace_locations || []).map do |loc|
          if built_methods.key?(loc.label.to_s)
            thread_backtrace_location = if loc.respond_to?(:__getobj__)
              loc.__getobj__
            else
              loc
            end
            SourceMapLocation.new(thread_backtrace_location, built_methods[loc.label.to_s])
          else
            loc
          end
        end
      end

Defined in actionpack/lib/action_dispatch/middleware/exception_wrapper.rb line 265 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionDispatch::ExceptionWrapper

Type at least 2 characters to search.

↑↓ navigate · open · esc close