<commit_before>class Exception

  # Is the exception an assertion?
  def assertion?
    @assertion
  end

  # Set the the exception's assertion flag.
  def set_assertion(boolean)
    @assertion = boolean # ? true : false
  end

  # Set message.
  # (not strictly needed here, but can be useful anyway).
  #
  # @todo Does the message have to be a string?
  def set_message(msg)
    @mesg = msg.to_str
  end

  # Set priority level.
  #
  # @param [Integer] level
  #   The priority level of the exception.
  #
  def set_priority(level)
    @priority = level.to_i
  end

  # Exceptions can have priority levels.
  #
  # Zero is a nominal error, less than zero are warnings.
  #
  def priority
    @priority ||= 0
  end

  # TODO: Consider assertion parameters for future vresion. If message
  # does not have to be string, it might serve this purpose instead.
  ##
  #def parameters<commit_msg>Small edit to exception doc. :doc:<commit_after>class Exception

  # Is the exception an assertion?
  def assertion?
    @assertion
  end

  # Set the the exception's assertion flag.
  def set_assertion(boolean)
    @assertion = boolean # ? true : false
  end

  # Set message.
  # (not strictly needed here, but can be useful anyway).
  #
  # @todo Does the message have to be a string?
  def set_message(msg)
    @mesg = msg.to_str
  end

  # Set priority level.
  #
  # @param [Integer] level
  #   The priority level of the exception.
  #
  def set_priority(level)
    @priority = level.to_i
  end

  # Exceptions can have priority levels.
  #
  # Zero is a nominal error, the higher the priority the more severe the
  # error is considered. Errors with priorities less than zero are taken
  # be warnings, the lower the number the more trivial.
  #
  def priority
    @priority ||= 0
  end

  # TODO: Consider assertion parameters for future vresion. If message
  # does not have to be string, it might serve this purpose instead.
  ##
  #def parameters
{'fraction_non_alphanumeric': 0.07329574577139929, 'fraction_numerical': 0.0010251153254741158, 'mean_word_length': 2.9275653923541247, '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': '447404', 'n_tokens_mistral': 609, 'n_tokens_neox': 582, 'n_words': 245}