Why this matters
Naming exception variables generically (`e`) makes debugging harder. Use meaningful titles that describe the type or context of the error.
Ensure that exception variables in `rescue` blocks use meaningful titles instead of generic ones like `e`.
Naming exception variables generically (`e`) makes debugging harder. Use meaningful titles that describe the type or context of the error.
Side-by-side examples engineers can pattern-match during review.
begin
risky_operation
rescue => e
puts e.message
end// (no example provided)begin
risky_operation
rescue => e
puts e.message
endFrom the same buckets as this rule.
Check if loops use equality operators (== or !=) in termination conditions. These can lead to infinite loops if the condition is never met exactly. Instead, use relational operators like < or > for safer loop termination.