Sha256: bf646ad0590c97f5eac3f4fc1f84273473e17588c6721e9a919af0e76148a3ca

Contents?: true

Size: 334 Bytes

Versions: 12

Compression:

Stored size: 334 Bytes

Contents

# frozen_string_literal: true

require_relative 'errors/base_error'

module Reek
  # Handles errors by logging to stderr
  class LoggingErrorHandler
    def handle(exception)
      case exception
      when Errors::BaseError
        warn exception.long_message
      else
        warn exception
      end
      true
    end
  end
end

Version data entries

12 entries across 10 versions & 2 rubygems

Version Path
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/reek-5.2.0/lib/reek/logging_error_handler.rb
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/reek-5.2.0/lib/reek/logging_error_handler.rb
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/reek-5.2.0/lib/reek/logging_error_handler.rb
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/reek-5.2.0/lib/reek/logging_error_handler.rb
reek-5.2.0 lib/reek/logging_error_handler.rb
reek-5.1.0 lib/reek/logging_error_handler.rb
reek-5.0.2 lib/reek/logging_error_handler.rb
reek-5.0.1 lib/reek/logging_error_handler.rb
reek-5.0.0 lib/reek/logging_error_handler.rb
reek-4.8.2 lib/reek/logging_error_handler.rb
reek-4.8.1 lib/reek/logging_error_handler.rb
reek-4.8.0 lib/reek/logging_error_handler.rb