<commit_before>require "rubycritic"
require "rubycritic/cli/options"

module Rubycritic
  module Cli
    class Application
      STATUS_SUCCESS = 0

      def initialize(argv)
        @options = Options.new(argv)
      end

      def execute
        parsed_options = @options.parse
        ::Rubycritic.create(parsed_options).execute
        STATUS_SUCCESS
      end
    end
  end
end<commit_msg>Rescue the invalid CLI option error<commit_after>require "rubycritic"
require "rubycritic/cli/options"

module Rubycritic
  module Cli
    class Application
      STATUS_SUCCESS = 0
      STATUS_ERROR   = 1

      def initialize(argv)
        @options = Options.new(argv)
      end

      def execute
        parsed_options = @options.parse
        ::Rubycritic.create(parsed_options).execute
        STATUS_SUCCESS
      rescue OptionParser::InvalidOption => error
        $stderr.puts "Error: #{error}"
        STATUS_ERROR
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.0684931506849315, 'fraction_numerical': 0.003161222339304531, 'mean_word_length': 2.4926470588235294, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2626882', 'n_tokens_mistral': 290, 'n_tokens_neox': 269, 'n_words': 67}