<commit_before>import React from 'react';
import RouteError from '../views/routeError';

export default function errorHandler(Component) {
  const originalRender = Component.prototype.render;
  Component.prototype.render = function() {
    try {
      return originalRender.apply(this, arguments);
    } catch (err) {
      return <RouteError error={err} component={this} />;
    }
  };
  return Component;
}<commit_msg>Added error log statement to errorHandler<commit_after>import React from 'react';
import RouteError from '../views/routeError';

export default function errorHandler(Component) {
  const originalRender = Component.prototype.render;
  Component.prototype.render = function() {
    try {
      return originalRender.apply(this, arguments);
    } catch (err) {
      /*eslint no-console:0*/
      console.log('Failed on render with', err);
      return <RouteError error={err} component={this} />;
    }
  };
  return Component;
}
{'fraction_non_alphanumeric': 0.12143611404435058, 'fraction_numerical': 0.0010559662090813093, 'mean_word_length': 3.911917098445596, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1686764', 'n_tokens_mistral': 255, 'n_tokens_neox': 253, 'n_words': 70}