<commit_before>package dotty.tools
package dotc
package reporting

import core.Contexts.Context
import collection.mutable
import Reporter._

/**
 * This class implements a Reporter that throws all errors and sends warnings and other
 * info to the underlying reporter.
 */
class ThrowingReporter(reportInfo: Reporter) extends Reporter {
  def doReport(d: Diagnostic)(implicit ctx: Context): Unit = d match {
    case _: Error => throw d
    case _ => reportInfo.report(d)
  }
}<commit_msg>Fix #704, make reporters print messages<commit_after>package dotty.tools
package dotc
package reporting

import core.Contexts.Context
import collection.mutable
import Reporter._

/**
 * This class implements a Reporter that throws all errors and sends warnings and other
 * info to the underlying reporter.
 */
class ThrowingReporter(reportInfo: Reporter) extends Reporter {
  def doReport(d: Diagnostic)(implicit ctx: Context): Unit = d match {
    case _: Error => throw d
    case _ => reportInfo.doReport(d)
  }
}
{'fraction_non_alphanumeric': 0.07952286282306163, 'fraction_numerical': 0.002982107355864811, 'mean_word_length': 4.532967032967033, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '3517314', 'n_tokens_mistral': 279, 'n_tokens_neox': 267, 'n_words': 105}