blob: d8e03ab66ab882167fe1548be7df7a716da9c401 (
plain) (
tree)
|
|
package dotty.tools
package dotc
package reporting
import core.Contexts.Context
import collection.mutable
import diagnostic.MessageContainer
import diagnostic.messages.Error
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(m: MessageContainer)(implicit ctx: Context): Unit = m match {
case _: Error => throw m
case _ => reportInfo.doReport(m)
}
}
|