<commit_before><html>
  <head>
    <meta charset="utf-8">
  </head>
  <body>
    <script src="../thread.js"></script>
    <script>
      var worker = thread({
        env: { error: true }
      })

      // throwing an error
      var task = worker.run(function (done) {
        if (env.error)
          throw new Error('invalid')
      })

      task.catch(function (err) {
        console.log('Error:', err)
      })

      // returning an error
      var task2 = worker.run(function (done) {
        if (env.error)
          return new Error('invalid')
      })

      task2.catch(function (err) {
        console.log('Error:', err)
      })
    </script>
  </body>
</html><commit_msg>chore(example): update error example<commit_after><html>
  <head>
    <meta charset="utf-8">
  </head>
  <body>
    <script src="../thread.js"></script>
    <script>
      var worker = thread({
        env: { error: true }
      })

      // throwing an error
      var task = worker.run(function (done) {
        if (env.error)
          throw new Error('invalid')
      })

      task.catch(function (err) {
        console.log('Error:', err)
      })

      // returning an error
      var task2 = worker.run(function () {
        if (env.error)
          return new Error('invalid')
      })

      task2.catch(function (err) {
        console.log('Error:', err)
      })

    </script>
  </body>
</html>
{'fraction_non_alphanumeric': 0.16260744985673353, 'fraction_numerical': 0.004297994269340974, 'mean_word_length': 1.7995991983967936, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '2053682', 'n_tokens_mistral': 446, 'n_tokens_neox': 434, 'n_words': 101}