Methods
- A
- C
- E
- F
- H
- L
- M
- N
- O
- R
- S
- T
- U
Attributes
[R] | backtrace_cleaner | |
[R] | exception | |
[R] | exception_class_name | |
[R] | wrapped_causes |
Class Public methods
new(backtrace_cleaner, exception) Link
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 48 def initialize(backtrace_cleaner, exception) @backtrace_cleaner = backtrace_cleaner @exception_class_name = exception.class.name @wrapped_causes = wrapped_causes_for(exception, backtrace_cleaner) @exception = exception if exception.is_a?(SyntaxError) @exception = ActiveSupport::SyntaxErrorProxy.new(exception) end @backtrace = build_backtrace end
status_code_for_exception(class_name) Link
Instance Public methods
actions() Link
annotated_source_code() Link
application_trace() Link
corrections() Link
error_highlight_available?() Link
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 210 def error_highlight_available? # ErrorHighlight.spot with backtrace_location keyword is available since error_highlight 0.4.0 defined?(ErrorHighlight) && Gem::Version.new(ErrorHighlight::VERSION) >= Gem::Version.new("0.4.0") end
exception_id() Link
exception_inspect() Link
exception_name() Link
exception_trace() Link
failures() Link
file_name() Link
framework_trace() Link
full_trace() Link
has_cause?() Link
has_corrections?() Link
line_number() Link
message() Link
original_message() Link
rescue_response?() Link
rescue_template() Link
routing_error?() Link
show?(request) Link
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 177 def show?(request) # We're treating `nil` as "unset", and we want the default setting to be # `:all`. This logic should be extracted to `env_config` and calculated # once. config = request.get_header("action_dispatch.show_exceptions") # Include true and false for backwards compatibility. case config when :none false when :rescuable rescue_response? when true ActionDispatch.deprecator.warn("Setting action_dispatch.show_exceptions to true is deprecated. Set to :all instead.") true when false ActionDispatch.deprecator.warn("Setting action_dispatch.show_exceptions to false is deprecated. Set to :none instead.") false else true end end
source_extracts() Link
source_to_show_id() Link
status_code() Link
sub_template_message() Link
template_error?() Link
trace_to_show() Link
traces() Link
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 145 def traces application_trace_with_ids = [] framework_trace_with_ids = [] full_trace_with_ids = [] full_trace.each_with_index do |trace, idx| trace_with_id = { exception_object_id: @exception.object_id, id: idx, trace: trace } if application_trace.include?(trace) application_trace_with_ids << trace_with_id else framework_trace_with_ids << trace_with_id end full_trace_with_ids << trace_with_id end { "Application Trace" => application_trace_with_ids, "Framework Trace" => framework_trace_with_ids, "Full Trace" => full_trace_with_ids } end