Sha256: 541f195f8033a09bd280e4fcc40ef3c5e6320472dd502b44b3553b5e6ec9edd1

Contents?: true

Size: 327 Bytes

Versions: 4

Compression:

Stored size: 327 Bytes

Contents

# encoding: utf-8

module Rubocop
  module Cop
    class HandleExceptions < Cop
      MSG = 'Do not suppress exceptions.'

      def on_resbody(node)
        _exc_list_node, _exc_var_node, body_node = *node

        add_offence(:warning, node.loc.line, MSG) if body_node.type == :nil

        super
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rubocop-0.8.3 lib/rubocop/cop/handle_exceptions.rb
rubocop-0.8.2 lib/rubocop/cop/handle_exceptions.rb
rubocop-0.8.1 lib/rubocop/cop/handle_exceptions.rb
rubocop-0.8.0 lib/rubocop/cop/handle_exceptions.rb