<commit_before><template lang="pug">
div
  b-alert(variant="danger", v-for="error in errors", :show='!error.dismissed', dismissible, @dismissed="error.dismissed = false")
    | {{ error.msg }}
  slot
</template>

<script>
export default {
  name: 'ErrorBoundary',
  data() {
    return { errors: [] };
  },
  errorCaptured (err, vm, info) {
    console.error(err, vm, info);
    this.errors.push({
      msg: err,
      dismissed: false,
    });
  },
}
</script><commit_msg>added link to ErrorBoundary source<commit_after><template lang="pug">
div
  b-alert(variant="danger", v-for="error in errors", :show='!error.dismissed', dismissible, @dismissed="error.dismissed = false")
    | {{ error.msg }}
  slot
</template>

<script>
// Based on: https://medium.com/@dillonchanis/handling-errors-in-vue-with-error-boundaries-91f6ead0093b
export default {
  name: 'ErrorBoundary',
  data() {
    return { errors: [] };
  },
  errorCaptured (err, vm, info) {
    console.error(err, vm, info);
    this.errors.push({
      msg: err,
      dismissed: false,
    });
  },
}
</script>
{'fraction_non_alphanumeric': 0.18173345759552656, 'fraction_numerical': 0.0065237651444548, 'mean_word_length': 3.609442060085837, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 1, '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': '1033160', 'n_tokens_mistral': 383, 'n_tokens_neox': 371, 'n_words': 76}