<commit_before>export function captureException(exception, options) {
  if (process.env.NODE_ENV === 'production') {
    console.error('An error occured and was sent to Sentry.', exception);
    window.Sentry && window.Sentry.withScope(scope => {
      if (options.extra) {
        scope.setExtras(options.extra);
      }
      window.Sentry.captureException(exception);
    });
  } else {
    throw exception;
  }
}
<commit_msg>Fix error loggin<commit_after>export function captureException(exception, options) {
  if (process.env.NODE_ENV === 'production') {
    console.error('An error occured and was sent to Sentry.', exception);
    window.Sentry && window.Sentry.withScope(scope => {
      if (options && options.extra) {
        scope.setExtras(options.extra);
      }
      window.Sentry.captureException(exception);
    });
  } else {
    throw exception;
  }
}

{'fraction_non_alphanumeric': 0.13302752293577982, 'fraction_numerical': 0.0, 'mean_word_length': 3.343283582089552, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5254607', 'n_tokens_mistral': 258, 'n_tokens_neox': 257, 'n_words': 53}