<commit_before>import React, { PureComponent } from 'react'
import stripAnsi from 'strip-ansi'
import { pure } from 'recompose'
import classNames from 'classnames'
import ansi2html from './ansi2html'
import isSafari from './is-safari'
import { FixedSizeList } from 'react-window'
import AutoSizer from 'react-virtualized-auto-sizer'

import style from './styles/Output.scss'

const errorOutput = (err) => (isSafari ? err.toString() : err.stack)
<commit_msg>handle string errors in errorOutput<commit_after>import React, { PureComponent } from 'react'
import stripAnsi from 'strip-ansi'
import { pure } from 'recompose'
import classNames from 'classnames'
import ansi2html from './ansi2html'
import isSafari from './is-safari'
import { FixedSizeList } from 'react-window'
import AutoSizer from 'react-virtualized-auto-sizer'

import style from './styles/Output.scss'

const errorOutput = (err) =>
  err.stack ? (isSafari ? err.toString() : err.stack)
            : err

{'fraction_non_alphanumeric': 0.11673553719008264, 'fraction_numerical': 0.004132231404958678, 'mean_word_length': 4.837349397590361, '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': '6459386', 'n_tokens_mistral': 314, 'n_tokens_neox': 309, 'n_words': 92}