aboutsummaryrefslogblamecommitdiff
path: root/src/dotty/tools/dotc/reporting/ThrowingReporter.scala
blob: eb854d5130fba119cc30313b3303bc51c55c5e16 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11










                                                            
                                                               



                                                                                
 
package dotty.tools
package dotc
package reporting

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

/**
 * This class implements a Reporter that stores all messages
 */
class ThrowingReporter(reportInfo: Reporter) extends Reporter {
  protected def doReport(d: Diagnostic)(implicit ctx: Context): Unit = d match {
    case _: Error => throw d
    case _ => reportInfo.report(d)
  }
}