edge badge
Methods
A
F
N
R
S
Attributes
[R] env
[R] exception
[R] file
[R] line_number
Class Public methods
new(env, exception)
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 32
def initialize(env, exception)
  @env = env
  @exception = original_exception(exception)

  expand_backtrace if exception.is_a?(SyntaxError) || exception.try(:original_exception).try(:is_a?, SyntaxError)
end
status_code_for_exception(class_name)
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 59
def self.status_code_for_exception(class_name)
  Rack::Utils.status_code(@@rescue_responses[class_name])
end
Instance Public methods
application_trace()
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 47
def application_trace
  clean_backtrace(:silent)
end
framework_trace()
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 51
def framework_trace
  clean_backtrace(:noise)
end
full_trace()
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 55
def full_trace
  clean_backtrace(:all)
end
rescue_template()
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 39
def rescue_template
  @@rescue_templates[@exception.class.name]
end
source_extract()
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 63
def source_extract
  exception.backtrace.map do |trace|
    file, line = trace.split(":")
    line_number = line.to_i
    {
      code: source_fragment(file, line_number),
      file: file,
      line_number: line_number
    }
  end if exception.backtrace
end
status_code()
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 43
def status_code
  self.class.status_code_for_exception(@exception.class.name)
end