Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tag: v1.1.0
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (23 sloc) 0.703 kb
class Exception
alias :clean_message :message
TraceSubstitutions = []
FrameworkRegexp = /generated_code|vendor|dispatch|ruby|script\/\w+/
def clean_backtrace
backtrace.collect do |line|
TraceSubstitutions.inject(line) do |line, (regexp, sub)|
line.gsub regexp, sub
end
end
end
def application_backtrace
before_application_frame = true
clean_backtrace.reject do |line|
non_app_frame = !! (line =~ FrameworkRegexp)
before_application_frame = false unless non_app_frame
non_app_frame && ! before_application_frame
end
end
def framework_backtrace
clean_backtrace.select {|line| line =~ FrameworkRegexp}
end
end
Jump to Line
Something went wrong with that request. Please try again.