1
1
module ActiveSupport
2
- # Backtraces often include many lines that are not relevant for the context under review. This makes it hard to find the
2
+ # Backtraces often include many lines that are not relevant for the context under review. This makes it hard to find the
3
3
# signal amongst the backtrace noise, and adds debugging time. With a BacktraceCleaner, filters and silencers are used to
4
4
# remove the noisy lines, so that only the most relevant lines remain.
5
5
#
6
6
# Filters are used to modify lines of data, while silencers are used to remove lines entirely. The typical filter use case
7
- # is to remove lengthy path information from the start of each line, and view file paths relevant to the app directory
8
- # instead of the file system root. The typical silencer use case is to exclude the output of a noisy library from the
7
+ # is to remove lengthy path information from the start of each line, and view file paths relevant to the app directory
8
+ # instead of the file system root. The typical silencer use case is to exclude the output of a noisy library from the
9
9
# backtrace, so that you can focus on the rest.
10
10
#
11
11
# ==== Example:
@@ -15,9 +15,9 @@ module ActiveSupport
15
15
# bc.add_silencer { |line| line =~ /mongrel|rubygems/ }
16
16
# bc.clean(exception.backtrace) # will strip the Rails.root prefix and skip any lines from mongrel or rubygems
17
17
#
18
- # To reconfigure an existing BacktraceCleaner (like the default one in Rails) and show as much data as possible, you can
19
- # always call <tt>BacktraceCleaner#remove_silencers!</tt>, which will restore the backtrace to a pristine state. If you
20
- # need to reconfigure an existing BacktraceCleaner so that it does not filter or modify the paths of any lines of the
18
+ # To reconfigure an existing BacktraceCleaner (like the default one in Rails) and show as much data as possible, you can
19
+ # always call <tt>BacktraceCleaner#remove_silencers!</tt>, which will restore the backtrace to a pristine state. If you
20
+ # need to reconfigure an existing BacktraceCleaner so that it does not filter or modify the paths of any lines of the
21
21
# backtrace, you can call BacktraceCleaner#remove_filters! These two methods will give you a completely untouched backtrace.
22
22
#
23
23
# Inspired by the Quiet Backtrace gem by Thoughtbot.
@@ -50,7 +50,7 @@ def add_filter(&block)
50
50
@filters << block
51
51
end
52
52
53
- # Adds a silencer from the block provided. If the silencer returns true for a given line, it will be excluded from
53
+ # Adds a silencer from the block provided. If the silencer returns true for a given line, it will be excluded from
54
54
# the clean backtrace.
55
55
#
56
56
# Example:
0 commit comments