<commit_before>module SIX
  class Currency

    def initialize
      config_path = File.expand_path('config/currency.yml', File.dirname(__FILE__))
      @codes = YAML.load_file(config_path)['currency']
    end

    # returns String
    def find_code(currency)
      code = @codes[currency]
      if code.nil?
        raise Exception, "Couldn't find Code number for Currency #{currency} on SIX" if code.nil?
      else
        code
      end
    end

  end
end<commit_msg>RV-333: better missing code handling<commit_after>module SIX
  class Currency

    def initialize
      config_path = File.expand_path('config/currency.yml', File.dirname(__FILE__))
      @codes = YAML.load_file(config_path)['currency']
    end

    # returns String
    def find_code(currency)
      code = @codes[currency]
      raise Exception, "Couldn't find Code number for Currency #{currency} on SIX" if code.nil?
      code
    end

  end
end
{'fraction_non_alphanumeric': 0.09120521172638436, 'fraction_numerical': 0.003257328990228013, 'mean_word_length': 2.923404255319149, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4968463', 'n_tokens_mistral': 291, 'n_tokens_neox': 276, 'n_words': 77}