class ActionDispatch::ExceptionWrapper

def traces

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