方法
- A
- C
- E
- F
- H
- L
- M
- N
- O
- R
- S
- T
- U
属性
[R] | backtrace_cleaner | |
[R] | exception | |
[R] | exception_class_name | |
[R] | wrapped_causes |
类公共方法
new(backtrace_cleaner, exception) 链接
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 50 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) 链接
实例公共方法
actions() 链接
annotated_source_code() 链接
application_trace() 链接
corrections() 链接
exception_id() 链接
exception_inspect() 链接
exception_name() 链接
exception_trace() 链接
failures() 链接
file_name() 链接
framework_trace() 链接
full_trace() 链接
has_cause?() 链接
has_corrections?() 链接
line_number() 链接
message() 链接
original_message() 链接
rescue_response?() 链接
rescue_template() 链接
routing_error?() 链接
show?(request) 链接
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 179 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") case config when :none false when :rescuable rescue_response? else true end end
source_extracts() 链接
source_to_show_id() 链接
status_code() 链接
sub_template_message() 链接
template_error?() 链接
来源:显示 | 在 GitHub 上
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 65 def template_error? @exception.is_a?(ActionView::Template::Error) end
trace_to_show() 链接
来源:显示 | 在 GitHub 上
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 204 def trace_to_show if traces["Application Trace"].empty? && rescue_template != "routing_error" "Full Trace" else "Application Trace" end end
traces() 链接
来源:显示 | 在 GitHub 上
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 147 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
unwrapped_exception() 链接
来源:显示 | 在 GitHub 上
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 105 def unwrapped_exception if wrapper_exceptions.include?(@exception_class_name) @exception.cause else @exception end end