Class: Rubocop::Cop::Lint::HandleExceptions
- Defined in:
- lib/rubocop/cop/lint/handle_exceptions.rb
Overview
This cop checks for rescue blocks with no body.
Constant Summary collapse
- MSG =
'Do not suppress exceptions.'
Constants inherited from Cop
Instance Attribute Summary
Attributes inherited from Cop
#config, #corrections, #offences, #processed_source
Instance Method Summary collapse
Methods inherited from Cop
#add_offence, all, #autocorrect?, #autocorrect_action, #convention, #cop_config, #cop_name, cop_name, cop_type, #debug?, #ignore_node, inherited, #initialize, lint?, #message, rails?, style?, #warning
Constructor Details
This class inherits a constructor from Rubocop::Cop::Cop
Instance Method Details
#on_resbody(node) ⇒ Object
10 11 12 13 14 |
# File 'lib/rubocop/cop/lint/handle_exceptions.rb', line 10 def on_resbody(node) _exc_list_node, _exc_var_node, body_node = *node warning(node, :expression) unless body_node end |