Sha256: 1956345b8969b11ffab8045b18631da194c4395b22e9b6b3ec6bb0c132602f9c

Contents?: true

Size: 342 Bytes

Versions: 22

Compression:

Stored size: 342 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.message
      end
      true
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
reek-6.4.0 lib/reek/logging_error_handler.rb
reek-6.3.0 lib/reek/logging_error_handler.rb
reek-6.2.0 lib/reek/logging_error_handler.rb
reek-6.1.4 lib/reek/logging_error_handler.rb
reek-6.1.3 lib/reek/logging_error_handler.rb
reek-6.1.2 lib/reek/logging_error_handler.rb
reek-6.1.1 lib/reek/logging_error_handler.rb
reek-6.1.0 lib/reek/logging_error_handler.rb
reek-6.0.6 lib/reek/logging_error_handler.rb
reek-6.0.5 lib/reek/logging_error_handler.rb
reek-6.0.4 lib/reek/logging_error_handler.rb
reek-6.0.3 lib/reek/logging_error_handler.rb
reek-6.0.2 lib/reek/logging_error_handler.rb
reek-6.0.1 lib/reek/logging_error_handler.rb
reek-6.0.0 lib/reek/logging_error_handler.rb
reek-5.6.0 lib/reek/logging_error_handler.rb
reek-5.5.0 lib/reek/logging_error_handler.rb
reek-5.4.1 lib/reek/logging_error_handler.rb
reek-5.4.0 lib/reek/logging_error_handler.rb
reek-5.3.2 lib/reek/logging_error_handler.rb